Part Number Hot Search : 
45N06 PZT3019 STA328 ISL54000 JANSR TDA74 7C010 CMHZ4116
Product Description
Full Text Search
 

To Download MCP2510-P Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 MCP2510
Stand-Alone CAN Controller with SPITM Interface
Features
* Implements Full CAN V2.0A and V2.0B at 1 Mb/s: - 0 - 8 byte message length - Standard and extended data frames - Programmable bit rate up to 1 Mb/s - Support for remote frames - Two receive buffers with prioritized message storage - Six full acceptance filters - Two full acceptance filter masks - Three transmit buffers with prioritization and abort features - Loop-back mode for self test operation * Hardware Features: - High Speed SPI Interface (5 MHz at 4.5V I temp) - Supports SPI modes 0,0 and 1,1 - Clock out pin with programmable prescaler - Interrupt output pin with selectable enables - `Buffer full' output pins configureable as interrupt pins for each receive buffer or as general purpose digital outputs - `Request to Send' input pins configureable as control pins to request immediate message transmission for each transmit buffer or as general purpose digital inputs - Low Power Sleep mode * Low power CMOS technology: - Operates from 3.0V to 5.5V - 5 mA active current typical - 10 A standby current typical at 5.5V * 18-pin PDIP/SOIC and 20-pin TSSOP packages * Temperature ranges supported: - Industrial (I): -40C to +85C - Extended (E): -40C to +125C
Description
The Microchip Technology Inc. MCP2510 is a Full Controller Area Network (CAN) protocol controller implementing CAN specification V2.0 A/B. It supports CAN 1.2, CAN 2.0A, CAN 2.0B Passive, and CAN 2.0B Active versions of the protocol, and is capable of transmitting and receiving standard and extended messages. It is also capable of both acceptance filtering and message management. It includes three transmit buffers and two receive buffers that reduce the amount of microcontroller (MCU) management required. The MCU communication is implemented via an industry standard Serial Peripheral Interface (SPI) with data rates up to 5 Mb/s.
Package Types
18 LEAD PDIP/SOIC
TXCAN RXCAN CLKOUT TX0RTS TX1RTS TX2RTS OSC2 OSC1 VSS 1 2 3 18 17 16 VDD RESET CS SO SI SCK INT RX0BF RX1BF
MCP2510
4 5 6 7 8 9
15 14 13 12 11 10
20 LEAD TSSOP
TXCAN RXCAN CLKOUT TX0RTS TX1RTS NC TX2RTS OSC2 OSC1 VSS 1 2 3 4 5 6 7 8 9 10 20 19 18 17 16 15 14 13 12 11 VDD RESET CS SO SI NC SCK INT RX0BF RX1BF
MCP2510
(c) 2007 Microchip Technology Inc.
DS21291F-page 1
MCP2510
Table of Contents 1.0 Device Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.0 Can Message Frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.0 Message Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.0 Message Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.0 Bit Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.0 Error Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 7.0 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 8.0 Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 9.0 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 10.0 Register Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 11.0 SPI Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 12.0 Electrical Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 13.0 Packaging Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 On-Line Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Reader Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Product Identification System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Worldwide Sales and Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
TO OUR VALUED CUSTOMERS
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and enhanced as new volumes and updates are introduced. If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via E-mail at docerrors@microchip.com or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We welcome your feedback.
Most Current Data Sheet
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at: http://www.microchip.com You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page. The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision of silicon and revision of document to which it applies. To determine if an errata sheet exists for a particular device, please check with one of the following: * Microchip's Worldwide Web site; http://www.microchip.com * Your local Microchip sales office (see last page) When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are using.
Customer Notification System
Register on our web site at www.microchip.com to receive the most current information on all of our products.
DS21291F-page 2
(c) 2007 Microchip Technology Inc.
MCP2510
1.0
1.1
DEVICE FUNCTIONALITY
Overview
checked for errors and then matched against the user defined filters to see if it should be moved into one of the two receive buffers. The MCU interfaces to the device via the SPI interface. Writing to and reading from all registers is done using standard SPI read and write commands. Interrupt pins are provided to allow greater system flexibility. There is one multi-purpose interrupt pin as well as specific interrupt pins for each of the receive registers that can be used to indicate when a valid message has been received and loaded into one of the receive buffers. Use of the specific interrupt pins is optional, and the general purpose interrupt pin as well as status registers (accessed via the SPI interface) can also be used to determine when a valid message has been received. There are also three pins available to initiate immediate transmission of a message that has been loaded into one of the three transmit registers. Use of these pins is optional and initiating message transmission can also be done by utilizing control registers accessed via the SPI interface. Table 1-1 gives a complete list of all of the pins on the MCP2510.
The MCP2510 is a stand-alone CAN controller developed to simplify applications that require interfacing with a CAN bus. A simple block diagram of the MCP2510 is shown in Figure 1-1. The device consists of three main blocks: 1. 2. 3. The CAN protocol engine. The control logic and SRAM registers that are used to configure the device and its operation. The SPI protocol block.
A typical system implementation using the device is shown in Figure 1-2. The CAN protocol engine handles all functions for receiving and transmitting messages on the bus. Messages are transmitted by first loading the appropriate message buffer and control registers. Transmission is initiated by using control register bits, via the SPI interface, or by using the transmit enable pins. Status and errors can be checked by reading the appropriate registers. Any message detected on the CAN bus is
FIGURE 1-1:
RXCAN
BLOCK DIAGRAM
2 RX Buffers CAN Protocol Engine 3 TX Buffers 6 Acceptance Filters Message Assembly Buffer SPI Interface Logic CS SCK SI SO SPI Bus
TXCAN
Control Logic INT RX0BF RX1BF TX0RTS TX1RTS TX2RTS
(c) 2007 Microchip Technology Inc.
DS21291F-page 3
MCP2510
FIGURE 1-2: TYPICAL SYSTEM IMPLEMENTATION
Main System Controller MCP2510 CAN Transceiver CAN BUS CAN Transceiver MCP2510 SPI INTERFACE Node Controller Node Controller Node Controller Node Controller CAN Transceiver MCP2510 CAN Transceiver MCP2510 CAN Transceiver MCP2510
TABLE 1-1:
Name TXCAN RXCAN CLKOUT TX0RTS TX1RTS TX2RTS OSC2 OSC1 VSS RX1BF RX0BF INT SCK SI SO CS RESET VDD NC Note:
PIN DESCRIPTIONS
DIP/ SOIC Pin # 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 -- TSSOP Pin # 1 2 3 4 5 7 8 9 10 11 12 13 14 16 17 18 19 20 6,15 I/O/P Type O I O I I I O I P O O O I I O I I P -- Transmit output pin to CAN bus Receive input pin from CAN bus Clock output pin with programmable prescaler Transmit buffer TXB0 request to send or general purpose digital input. 100 k internal pullup to VDD Transmit buffer TXB1 request to send or general purpose digital input. 100 k internal pullup to VDD Transmit buffer TXB2 request to send or general purpose digital input. 100 k internal pullup to VDD Oscillator output Oscillator input Ground reference for logic and I/O pins Receive buffer RXB1 interrupt pin or general purpose digital output Receive buffer RXB0 interrupt pin or general purpose digital output Interrupt output pin Clock input pin for SPI interface Data input pin for SPI interface Data output pin for SPI interface Chip select input pin for SPI interface Active low device reset input Positive supply for logic and I/O pins No internal connection Description
Type Identification: I=Input; O=Output; P=Power
DS21291F-page 4
(c) 2007 Microchip Technology Inc.
MCP2510
1.2 Transmit/Receive Buffers
The MCP2510 has three transmit and two receive buffers, two acceptance masks (one for each receive buffer), and a total of six acceptance filters. Figure 1-3 is a block diagram of these buffers and their connection to the protocol engine.
FIGURE 1-3:
CAN BUFFERS AND PROTOCOL ENGINE BLOCK DIAGRAM
Acceptance Mask RXM1 Acceptance Filter RXF2
BUFFERS
Acceptance Mask RXM0 Acceptance Filter RXF0 Acceptance Filter RXF1
TXB0 MESSAGE TXREQ ABTF MLOA TXERR
TXB1 MESSAGE TXREQ ABTF MLOA TXERR
TXB2 MESSAGE TXREQ ABTF MLOA TXERR
A c c e p t
Acceptance Filter RXF3 Acceptance Filter RXF4 Acceptance Filter RXF5
A c c e p t
Message Queue Control
R X B 0 Transmit Byte Sequencer
Identifier
M A B
Identifier
R X B 1
Data Field
Data Field
PROTOCOL ENGINE
Transmit<7:0> Shift<14:0> {Transmit<5:0>, Receive<8:0>} Comparator Receive<7:0>
Receive Error Counter Transmit Error Counter
REC TEC ErrPas BusOff
CRC<14:0>
Protocol Finite State Machine
Transmit Logic
Bit Timing Logic
Clock Generator
TX
RX Configuration Registers
(c) 2007 Microchip Technology Inc.
DS21291F-page 5
MCP2510
1.3 CAN Protocol Engine 1.6 Error Management Logic
The CAN protocol engine combines several functional blocks, shown in Figure 1-4. These blocks and their functions are described below. The Error Management Logic is responsible for the fault confinement of the CAN device. Its two counters, the Receive Error Counter (REC) and the Transmit Error Counter (TEC), are incremented and decremented by commands from the Bit Stream Processor. According to the values of the error counters, the CAN controller is set into the states error-active, error-passive or bus-off.
1.4
Protocol Finite State Machine
The heart of the engine is the Finite State Machine (FSM). This state machine sequences through messages on a bit by bit basis, changing states as the fields of the various frame types are transmitted or received. The FSM is a sequencer controlling the sequential data stream between the TX/RX Shift Register, the CRC Register, and the bus line. The FSM also controls the Error Management Logic (EML) and the parallel data stream between the TX/RX Shift Registers and the buffers. The FSM insures that the processes of reception, arbitration, transmission, and error signaling are performed according to the CAN protocol. The automatic retransmission of messages on the bus line is also handled by the FSM.
1.7
Bit Timing Logic
1.5
Cyclic Redundancy Check
The Cyclic Redundancy Check Register generates the Cyclic Redundancy Check (CRC) code which is transmitted after either the Control Field (for messages with 0 data bytes) or the Data Field, and is used to check the CRC field of incoming messages.
The Bit Timing Logic (BTL) monitors the bus line input and handles the bus related bit timing according to the CAN protocol. The BTL synchronizes on a recessive to dominant bus transition at Start of Frame (hard synchronization) and on any further recessive to dominant bus line transition if the CAN controller itself does not transmit a dominant bit (resynchronization). The BTL also provides programmable time segments to compensate for the propagation delay time, phase shifts, and to define the position of the Sample Point within the bit time. The programming of the BTL depends upon the baud rate and external physical delay times.
FIGURE 1-4:
RX
CAN PROTOCOL ENGINE BLOCK DIAGRAM
Bit Timing Logic SAM Sample<2:0> StuffReg<5:0> Majority Decision BusMon Comparator Transmit Error Counter ErrPas BusOff Receive Error Counter REC TEC Transmit Logic TX
CRC<14:0> Protocol FSM Comparator Shift<14:0> (Transmit<5:0>, Receive<7:0>) Receive<7:0> Transmit<7:0>
RecData<7:0>
TrmData<7:0> Interface to Standard Buffer
Rec/Trm Addr.
DS21291F-page 6
(c) 2007 Microchip Technology Inc.
MCP2510
2.0 CAN MESSAGE FRAMES
The MCP2510 supports Standard Data Frames, Extended Data Frames, and Remote Frames (Standard and Extended) as defined in the CAN 2.0B specification. dard CAN frame will win arbitration due to the assertion of a dominant lDE bit. Also, the SRR bit in an extended CAN frame must be recessive to allow the assertion of a dominant RTR bit by a node that is sending a standard CAN remote frame. The SRR and lDE bits are followed by the remaining 18 bits of the identifier (Extended lD) and the remote transmission request bit. To enable standard and extended frames to be sent across a shared network, it is necessary to split the 29bit extended message identifier into 11-bit (most significant) and 18-bit (least significant) sections. This split ensures that the lDE bit can remain at the same bit position in both standard and extended frames. Following the arbitration field is the six-bit control field. the first two bits of this field are reserved and must be dominant. the remaining four bits of the control field are the Data Length Code (DLC) which specifies the number of data bytes contained in the message. The remaining portion of the frame (data field, CRC field, acknowledge field, end of frame and lntermission) is constructed in the same way as for a standard data frame (see Section 2.1).
2.1
Standard Data Frame
The CAN Standard Data Frame is shown in Figure 2-1. In common with all other frames, the frame begins with a Start Of Frame (SOF) bit, which is of the dominant state, which allows hard synchronization of all nodes. The SOF is followed by the arbitration field, consisting of 12 bits; the 11-bit ldentifier and the Remote Transmission Request (RTR) bit. The RTR bit is used to distinguish a data frame (RTR bit dominant) from a remote frame (RTR bit recessive). Following the arbitration field is the control field, consisting of six bits. The first bit of this field is the Identifier Extension (IDE) bit which must be dominant to specify a standard frame. The following bit, Reserved Bit Zero (RB0), is reserved and is defined to be a dominant bit by the can protocol. the remaining four bits of the control field are the Data Length Code (DLC) which specifies the number of bytes of data contained in the message. After the control field is the data field, which contains any data bytes that are being sent, and is of the length defined by the DLC above (0-8 bytes). The Cyclic Redundancy Check (CRC) Field follows the data field and is used to detect transmission errors. The CRC Field consists of a 15-bit CRC sequence, followed by the recessive CRC Delimiter bit. The final field is the two-bit acknowledge field. During the ACK Slot bit, the transmitting node sends out a recessive bit. Any node that has received an error free frame acknowledges the correct reception of the frame by sending back a dominant bit (regardless of whether the node is configured to accept that specific message or not). The recessive acknowledge delimiter completes the acknowledge field and may not be overwritten by a dominant bit.
2.3
Remote Frame
Normally, data transmission is performed on an autonomous basis by the data source node (e.g. a sensor sending out a data frame). It is possible, however, for a destination node to request data from the source. To accomplish this, the destination node sends a remote frame with an identifier that matches the identifier of the required data frame. The appropriate data source node will then send a data frame in response to the remote frame request. There are two differences between a remote frame (shown in Figure 2-3) and a data frame. First, the RTR bit is at the recessive state, and second, there is no data field. In the event of a data frame and a remote frame with the same identifier being transmitted at the same time, the data frame wins arbitration due to the dominant RTR bit following the identifier. In this way, the node that transmitted the remote frame receives the desired data immediately.
2.2
Extended Data Frame
In the Extended CAN Data Frame, the SOF bit is followed by the arbitration field which consists of 32 bits, as shown in Figure 2-2. The first 11 bits are the most significant bits (Base-lD) of the 29-bit identifier. These 11 bits are followed by the Substitute Remote Request (SRR) bit which is defined to be recessive. The SRR bit is followed by the lDE bit which is recessive to denote an extended CAN frame. It should be noted that if arbitration remains unresolved after transmission of the first 11 bits of the identifier, and one of the nodes involved in the arbitration is sending a standard CAN frame (11-bit identifier), then the stan-
2.4
Error Frame
An Error Frame is generated by any node that detects a bus error. An error frame, shown in Figure 2-4, consists of two fields, an error flag field followed by an error delimiter field. There are two types of error flag fields. Which type of error flag field is sent depends upon the error status of the node that detects and generates the error flag field. If an error-active node detects a bus error then the node interrupts transmission of the current message by generating an active error flag. The active error flag is composed of six consecutive dominant bits. This bit
(c) 2007 Microchip Technology Inc.
DS21291F-page 7
MCP2510
sequence actively violates the bit stuffing rule. All other stations recognize the resulting bit stuffing error and in turn generate error frames themselves, called error echo flags. The error flag field, therefore, consists of between six and twelve consecutive dominant bits (generated by one or more nodes). The error delimiter field completes the error frame. After completion of the error frame, bus activity returns to normal and the interrupted node attempts to resend the aborted message. If an error-passive node detects a bus error then the node transmits an error-passive flag followed by the error delimiter field. The error-passive flag consists of six consecutive recessive bits, and the error frame for an error-passive node consists of 14 recessive bits. From this, it follows that unless the bus error is detected by the node that is actually transmitting, the transmission of an error frame by an error-passive node will not affect any other node on the network. If the transmitting node generates an error-passive flag then this will cause other nodes to generate error frames due to the resulting bit stuffing violation. After transmission of an error frame, an error-passive node must wait for six consecutive recessive bits on the bus before attempting to rejoin bus communications. The error delimiter consists of eight recessive bits and allows the bus nodes to restart bus communications cleanly after an error has occurred.
2.5
Overload Frame
An Overload Frame, shown in Figure 2-5, has the same format as an active error frame. An overload frame, however can only be generated during an lnterframe space. In this way an overload frame can be differentiated from an error frame (an error frame is sent during the transmission of a message). The overload frame consists of two fields, an overload flag followed by an overload delimiter. The overload flag consists of six dominant bits followed by overload flags generated by other nodes (and, as for an active error flag, giving a maximum of twelve dominant bits). The overload delimiter consists of eight recessive bits. An overload frame can be generated by a node as a result of two conditions. First, the node detects a dominant bit during the interframe space which is an illegal condition. Second, due to internal conditions the node is not yet able to start reception of the next message. A node may generate a maximum of two sequential overload frames to delay the start of the next message.
2.6
Interframe Space
The lnterframe Space separates a preceeding frame (of any type) from a subsequent data or remote frame. The interframe space is composed of at least three recessive bits called the Intermission. This is provided to allow nodes time for internal processing before the start of the next message frame. After the intermission, the bus line remains in the recessive state (bus idle) until the next transmission starts.
DS21291F-page 8
(c) 2007 Microchip Technology Inc.
FIGURE 2-1:
STANDARD DATA FRAME
Start of Frame ID 10
11 ID3
8 DLC0
8
ID0 RTR IDE RB0 DLC3
15 CRC
CRC Del Ack Slot Bit ACK Del
Identifier Message Filtering Stored in Buffers
Reserved Bit
(c) 2007 Microchip Technology Inc. DS21291F-page 9
Data Frame (number of bits = 44 + 8N) 12 Arbitration Field 6 Control Field 4 8N (0N8) Data Field 16 CRC Field 7 End of Frame IFS
0
000 Data Length Code Stored in Transmit/Receive Buffers Bit Stuffing
1
11111111111
MCP2510
FIGURE 2-2:
EXTENDED DATA FRAME
Start of Frame ID10
11 ID0 SRR IDE EID17 ID3
18 EID0 RTR RB1 RB0 DLC3
4 DLC0
8
8
15 CRC
CRC Del Ack Slot Bit ACK Del
Reserved bits
(c) 2007 Microchip Technology Inc. DS21291F-page 10
Data Frame (number of bits = 64 + 8N) 32 Arbitration Field 6 Control Field 8N (0N8) Data Field 16 CRC Field 7 End of Frame IFS
0 Identifier Message Filtering
11 Extended Identifier
000 Data Length Code Stored in Transmit/Receive Buffers
1
11111111111
Stored in Buffers
Bit Stuffing
MCP2510
FIGURE 2-3:
REMOTE DATA FRAME
Start of Frame ID10
11 ID0 SRR IDE EID17 ID3
18 EID0 RTR RB1 RB0 DLC3
4 DLC0
15 CRC
CRC Del Ack Slot Bit ACK Del
Reserved bits
(c) 2007 Microchip Technology Inc. DS21291F-page 11
32 Arbitration Field
6 Control Field
16 CRC Field
7 End of Frame IFS
0 Identifier Message Filtering
11 Extended Identifier
100 Data Length Code
1
11111111111
Remote Data Frame with Extended Identifier
MCP2510
FIGURE 2-4:
ERROR DATA FRAME
Start of Frame ID 10
ID0 RTR IDE RB0 DLC3
0 Identifier Message Filtering
000 Data Length Code
Reserved Bit
DLC0
ID3
(c) 2007 Microchip Technology Inc. DS21291F-page 12
Interrupted Data Frame 12 Arbitration Field 6 Control Field 4 8N (0N8) Data Field 8 8
11
Error Frame Bit Stuffing Data Frame or Remote Frame 6 Error Flag 6 Echo Error Flag 8 Error Delimiter Inter-Frame Space or Overload Frame
0000000
00111111110
MCP2510
FIGURE 2-5:
OVERLOAD FRAME
Start of Frame ID 10
11
ID0 RTR IDE RB0 DLC3
0
100
DLC0
15 CRC
CRC Del Ack Slot Bit ACK Del
(c) 2007 Microchip Technology Inc. DS21291F-page 13
Remote Frame (number of bits = 44) 12 Arbitration Field 6 Control Field 4 16 CRC Field 7 End of Frame
1
11111111
Overload Frame End of Frame or Error Delimiter or Overload Delimiter 6 Overload Flag Inter-Frame Space or Error Frame
8 Overload Delimiter
000000011111111
MCP2510
MCP2510
NOTES:
DS21291F-page 14
(c) 2007 Microchip Technology Inc.
MCP2510
3.0
3.1
MESSAGE TRANSMISSION
Transmit Buffers
ted. If transmission is initiated via the SPI interface, the TXREQ bit can be set at the same time as the TXP priority bits. is set, When TXBNCTRL.TXREQ TXBNCTRL.MLOA TXBNCTRL.ABTF, TXBNCTRL.TXERR bits will be cleared. the and
The MCP2510 implements three Transmit Buffers. Each of these buffers occupies 14 bytes of SRAM and are mapped into the device memory maps. The first byte, TXBNCTRL, is a control register associated with the message buffer. The information in this register determines the conditions under which the message will be transmitted and indicates the status of the message transmission. (see Register 3-2). Five bytes are used to hold the standard and extended identifiers and other message arbitration information (see Register 33 through Register 3-8). The last eight bytes are for the eight possible data bytes of the message to be transmitted (see Register 3-8). For the MCU to have write access to the message buffer, the TXBNCTRL.TXREQ bit must be clear, indicating that the message buffer is clear of any pending message to be transmitted. At a minimum, the TXBNSIDH, TXBNSIDL, and TXBNDLC registers must be loaded. If data bytes are present in the message, the TXBNDm registers must also be loaded. If the message is to use extended identifiers, the TXBNEIDm registers must also be loaded and the TXBNSIDL.EXIDE bit set. Prior to sending the message, the MCU must initialize the CANINTE.TXINE bit to enable or disable the generation of an interrupt when the message is sent. The MCU must also initialize the TXBNCTRL.TXP priority bits (see Section 3.2).
Setting the TXBNCTRL.TXREQ bit does not initiate a message transmission, it merely flags a message buffer as ready for transmission. Transmission will start when the device detects that the bus is available. The device will then begin transmission of the highest priority message that is ready. When the transmission has completed successfully the TXBNCTRL.TXREQ bit will be cleared, the CANINTF.TXNIF bit will be set, and an interrupt will be generated if the CANINTE.TXNIE bit is set. If the message transmission fails, the TXBNCTRL.TXREQ will remain set indicating that the message is still pending for transmission and one of the following condition flags will be set. If the message started to transmit but encountered an error condition, the TXBNCTRL. TXERR and the CANINTF.MERRF bits will be set and an interrupt will be generated on the INT pin if the CANINTE.MERRE bit is set. If the message lost arbitration the TXBNCTRL.MLOA bit will be set.
3.4
TXnRTS Pins
3.2
Transmit Priority
Transmit priority is a prioritization, within the MCP2510, of the pending transmittable messages. This is independent from, and not necessarily related to, any prioritization implicit in the message arbitration scheme built into the CAN protocol. Prior to sending the SOF, the priority of all buffers that are queued for transmission is compared. The transmit buffer with the highest priority will be sent first. For example, if transmit buffer 0 has a higher priority setting than transmit buffer 1, buffer 0 will be sent first. If two buffers have the same priority setting, the buffer with the highest buffer number will be sent first. For example, if transmit buffer 1 has the same priority setting as transmit buffer 0, buffer 1 will be sent first. There are four levels of transmit priority. If TXBNCTRL.TXP<1:0> for a particular message buffer is set to 11, that buffer has the highest possible priority. If TXBNCTRL.TXP<1:0> for a particular message buffer is 00, that buffer has the lowest possible priority.
The TXNRTS Pins are input pins that can be configured as request-to-send inputs, which provides a secondary means of initiating the transmission of a message from any of the transmit buffers, or as standard digital inputs. Configuration and control of these pins is accomplished using the TXRTSCTRL register (see Register 3-2). The TXRTSCTRL register can only be modified when the MCP2510 is in configuration mode (see Section 9.0). If configured to operate as a request to send pin, the pin is mapped into the respective TXBNCTRL.TXREQ bit for the transmit buffer. The TXREQ bit is latched by the falling edge of the TXNRTS pin. The TXNRTS pins are designed to allow them to be tied directly to the RXNBF pins to automatically initiate a message transmission when the RXNBF pin goes low. The TXNRTS pins have internal pullup resistors of 100 k (nominal).
3.5
Aborting Transmission
3.3
Initiating Transmission
To initiate message transmission the TXBNCTRL.TXREQ bit must be set for each buffer to be transmitted. This can be done by writing to the register via the SPI interface or by setting the TXNRTS pin low for the particular transmit buffer(s) that are to be transmit-
The MCU can request to abort a message in a specific message buffer by clearing the associated TXBnCTRL.TXREQ bit. Also, all pending messages can be requested to be aborted by setting the CANCTRL.ABAT bit. If the CANCTRL.ABAT bit is set to abort all pending messages, the user MUST reset this bit (typically after the user verifies that all TXREQ bits have been cleared) to continue trasmit messages. The CANCTRL.ABTF flag will only be set if the abort was requested via the CANCTRL.ABAT bit. Aborting a message by resetting the TXREQ bit does cause the ATBF bit to be set.
(c) 2007 Microchip Technology Inc.
DS21291F-page 15
MCP2510
Only messages that have not already begun to be transmitted can be aborted. Once a message has begun transmission, it will not be possible for the user to reset the TXBnCTRL.TXREQ bit. After transmission of a message has begun, if an error occurs on the bus or if the message loses arbitration, the message will be retransmitted regardless of a request to abort.
FIGURE 3-1:
TRANSMIT MESSAGE FLOWCHART
Start
No
Are any TXBnCTRL.TXREQ bits = 1 ? Yes Clear: TXBnCTRL.ABTF TXBnCTRL.MLOA TXBnCTRL.TXERR
The message transmission sequence begins when the device determines that the TXBnCTRL.TXREQ for any of the transmit registers has been set.
Clearing the TxBnCTRL.TXREQ bit while it is set, or setting the CANCTRL.ABAT bit before the message has started transmission will abort the message.
Is CAN Bus available to start transmission ? Yes
No
is TXBnCTRL.TXREQ=0 CANCTRL.ABAT=1 ? Yes
No
Examine TXBnCTRL.TXP <1:0> to Determine Highest Priority Message
Transmit Message
Was Message Transmitted Successfully?
No
Did a message error occur?
Yes
Set TxBnCTRL.TXERR=1
Yes Set TxBnCTRL.TXREQ=0
No
Yes Generate Interrupt CANINTE.TXnIE=1?
Was Arbitration lost during transmission? No No Set CANTINF.TXnIF=1
Yes TxBnCTRL.MLOA=1
The CANINTE.TXnIE bit determines if an interrupt should be generated when a message is successfully transmitted.
GOTO START
DS21291F-page 16
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 3-1: TXBNCTRL Transmit Buffer N Control Register (ADDRESS: 30h, 40h, 50h)
U-0 -- bit 7 bit 7 bit 6 Unimplemented: Read as '0' ABTF: Message Aborted Flag 1 = Message was aborted 0 = Message completed transmission successfully MLOA: Message Lost Arbitration 1 = Message lost arbitration while being sent 0 = Message did not lose arbitration while being sent TXERR: Transmission Error Detected 1 = A bus error occurred while the message was being transmitted 0 = No bus error occurred while the message was being transmitted TXREQ: Message Transmit Request 1 = Buffer is currently pending transmission (MCU sets this bit to request message be transmitted - bit is automatically cleared when the message is sent) 0 = Buffer is not currently pending transmission (MCU can clear this bit to request a message abort) Unimplemented: Read as '0' TXP<1:0>: Transmit Buffer Priority 11 = Highest Message Priority 10 = High Intermediate Message Priority 11 = Low Intermediate Message Priority 00 = Lowest Message Priority Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R-0 ABTF R-0 MLOA R-0 TXERR R/W-0 TXREQ U-0 -- R/W-0 TXP1 R/W-0 TXP0 bit 0
bit 5
bit 4
bit 3
bit 2 bit 1-0
(c) 2007 Microchip Technology Inc.
DS21291F-page 17
MCP2510
REGISTER 3-2: TXRTSCTRL - TXNRTS PIN CONTROL AND STATUS REGISTER (ADDRESS: 0Dh)
U-0 -- bit 7 bit 7 bit 6 bit 5 Unimplemented: Read as '0' Unimplemented: Read as '0' B2RTS: TX2RTS Pin State - Reads state of TX2RTS pin when in digital input mode - Reads as `0' when pin is in `request to send' mode B1RTS: TX1RTX Pin State - Reads state of TX1RTS pin when in digital input mode - Reads as `0' when pin is in `request to send' mode B0RTS: TX0RTS Pin State - Reads state of TX0RTS pin when in digital input mode - Reads as `0' when pin is in `request to send' mode B2RTSM: TX2RTS Pin Mode 1 = Pin is used to request message transmission of TXB2 buffer (on falling edge) 0 = Digital input B1RTSM: TX1RTS Pin Mode 1 = Pin is used to request message transmission of TXB1 buffer (on falling edge) 0 = Digital input B0RTSM: TX0RTS Pin Mode 1 = Pin is used to request message transmission of TXB0 buffer (on falling edge) 0 = Digital input Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown U-0 -- R-x B2RTS R-x B1RTS R-x B0RTS R/W-0 B2RTSM R/W-0 R/W-0 bit 0 B1RTSM B0RTSM
bit 4
bit 3
bit 2
bit 1
bit 0
REGISTER 3-3:
TXBNSIDH - TRANSMIT BUFFER N STANDARD IDENTIFIER HIGH (ADDRESS: 31h, 41h, 51h)
R/W-x SID10 bit 7 R/W-x SID9 R/W-x SID8 R/W-x SID7 R/W-x SID6 R/W-x SID5 R/W-x SID4 R/W-x SID3 bit 0
bit 7-0
SID<10:3>: Standard Identifier Bits <10:3> Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 18
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 3-4: TXBNSIDL - Transmit Buffer N Standard Identifier Low (ADDRESS: 32h, 42h, 52h)
R/W-x SID2 bit 7 bit 7-5 bit 4 bit 3 SID<2:0>: Standard Identifier Bits <2:0> Unimplemented: Reads as '0' EXIDE: Extended Identifier Enable 1 = Message will transmit extended identifier 0 = Message will transmit standard identifier Unimplemented: Reads as '0' EID<17:16>: Extended Identifier Bits <17:16> Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R/W-x SID1 R/W-x SID0 R/W-x -- R/W-x EXIDE R/W-x -- R/W-x EID17 R/W-x EID16 bit 0
bit 2 bit 1-0
REGISTER 3-5:
TXBNEID8 - TRANSMIT BUFFER N EXTENDED IDENTIFIER HIGH (ADDRESS: 33h, 43h, 53h)
R/W-x EID15 bit 7 R/W-x EID14 R/W-x EID13 R/W-x EID12 R/W-x EID11 R/W-x EID10 R/W-x EID9 R/W-x EID8 bit 0
bit 7-0
EID<15:8>: Extended Identifier Bits <15:8> Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 3-6:
TXBNEID0 - TRANSMIT BUFFER N EXTENDED IDENTIFIER LOW (ADDRESS: 34h, 44h, 54h)
R/W-x EID7 bit 7 R/W-x EID6 R/W-x EID5 R/W-x EID4 R/W-x EID3 R/W-x EID2 R/W-x EID1 R/W-x EID0 bit 0
bit 7-0
EID<7:0>: Extended Identifier Bits <7:0> Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
(c) 2007 Microchip Technology Inc.
DS21291F-page 19
MCP2510
REGISTER 3-7: TXBNDLC - Transmit Buffer N Data Length Code (ADDRESS: 35h, 45h, 55h)
R/W-x -- bit 7 bit 7 bit 6 Unimplemented: Reads as '0' RTR: Remote Transmission Request Bit 1 = Transmitted Message will be a Remote Transmit Request 0 = Transmitted Message will be a Data Frame Unimplemented: Reads as '0' DLC<3:0>: Data Length Code Sets the number of data bytes to be transmitted (0 to 8 bytes) Note: It is possible to set the DLC to a value greater than 8, however only 8 bytes are transmitted R/W-x RTR R/W-x -- R/W-x -- R/W-x DLC3 R/W-x DLC2 R/W-x DLC1 R/W-x DLC0 bit 0
bit 5-4 bit 3-0
Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 3-8:
TXBNDM - Transmit Buffer N Data Field Byte m (ADDRESS: 36h-3Dh, 46h-4Dh, 56h-5Dh)
R/W-x TXBNDm 7 bit 7 R/W-x TXBNDm 6 R/W-x TXBNDm 5 R/W-x TXBNDm 4 R/W-x TXBNDm 3 R/W-x TXBNDm 2 R/W-x TXBNDm 1 R/W-x TXBNDm 0 bit 0
bit 7-0
TXBNDM7:TXBNDM0: Transmit Buffer N Data Field Byte m Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 20
(c) 2007 Microchip Technology Inc.
MCP2510
4.0
4.1
MESSAGE RECEPTION
Receive Message Buffering
When a message is received, bits <3:0> of the RXBNCTRL Register will indicate the acceptance filter number that enabled reception, and whether the received message is a remote transfer request. The RXBNCTRL.RXM bits set special receive modes. Normally, these bits are set to 00 to enable reception of all valid messages as determined by the appropriate acceptance filters. In this case, the determination of whether or not to receive standard or extended messages is determined by the RFXNSIDL.EXIDE bit in the acceptance filter register. If the RXBNCTRL.RXM bits are set to 01 or 10, the receiver will accept only messages with standard or extended identifiers respectively. If an acceptance filter has the RFXNSIDL.EXIDE bit set such that it does not correspond with the RXBNCTRL.RXM mode, that acceptance filter is rendered useless. These two modes of RXBNCTRL.RXM bits can be used in systems where it is known that only standard or extended messages will be on the bus. If the RXBNCTRL.RXM bits are set to 11, the buffer will receive all messages regardless of the values of the acceptance filters. Also, if a message has an error before the end of frame, that portion of the message assembled in the MAB before the error frame will be loaded into the buffer. This mode has some value in debugging a CAN system and would not be used in an actual system environment.
The MCP2510 includes two full receive buffers with multiple acceptance filters for each. There is also a separate Message Assembly Buffer (MAB) which acts as a third receive buffer (see Figure 4-1).
4.2
Receive Buffers
Of the three Receive Buffers, the MAB is always committed to receiving the next message from the bus. The remaining two receive buffers are called RXB0 and RXB1 and can receive a complete message from the protocol engine. The MCU can access one buffer while the other buffer is available for message reception or holding a previously received message. The MAB assembles all messages received. These messages will be transferred to the RXBN buffers (See Register 4-4 to Register 4-9) only if the acceptance filter criteria are met. Note: The entire contents of the MAB is moved into the receive buffer once a message is accepted. This means that regardless of the type of identifier (standard or extended) and the number of data bytes received, the entire receive buffer is overwritten with the MAB contents. Therefore the contents of all registers in the buffer must be assumed to have been modified when any message is received.
4.4
RX0BF and RX1BF Pins
When a message is moved into either of the receive buffers the appropriate CANINTF.RXNIF bit is set. This bit must be cleared by the MCU, when it has completed processing the message in the buffer, in order to allow a new message to be received into the buffer. This bit provides a positive lockout to ensure that the MCU has finished with the message before the MCP2510 attempts to load a new message into the receive buffer. If the CANINTE.RXNIE bit is set an interrupt will be generated on the INT pin to indicate that a valid message has been received.
In addition to the INT pin which provides an interrupt signal to the MCU for many different conditions, the receive buffer full pins (RX0BF and RX1BF) can be used to indicate that a valid message has been loaded into RXB0 or RXB1, respectively. The RXBNBF full pins can be configured to act as buffer full interrupt pins or as standard digital outputs. Configuration and status of these pins is available via the BFPCTRL register (Register 4-3). When set to operate in interrupt mode (by setting BFPCTRL.BxBFE and BFPCTRL.BxBFM bits to a 1), these pins are active low and are mapped to the CANINTF.RXNIF bit for each receive buffer. When this bit goes high for one of the receive buffers, indicating that a valid message has been loaded into the buffer, the corresponding RXNBF pin will go low. When the CANINTF.RXNIF bit is cleared by the MCU, then the corresponding interrupt pin will go to the logic high state until the next message is loaded into the receive buffer. When used as digital outputs, the BFPCTRL.BxBFM bits must be cleared to a `0' and BFPCTRL.BxBFE bits must be set to a `1' for the associated buffer. In this mode the state of the pin is controlled by the BFPCTRL.BxBFS bits. Writting a `1' to the BxBFS bit will cause a high level to be driven on the assicated buffer full pin, and a `0' will cause the pin to drive low. When using the pins in this mode the state of the pin should be modified only by using the Bit Modify SPI command to prevent glitches from occuring on either of the buffer full pins.
DS21291F-page 21
4.3
Receive Priority
RXB0 is the higher priority buffer and has two message acceptance filters associated with it. RXB1 is the lower priority buffer and has four acceptance filters associated with it. The lower number of acceptance filters makes the match on RXB0 more restrictive and implies a higher priority for that buffer. Additionally, the RXB0CTRL register can be configured such that if RXB0 contains a valid message, and another valid message is received, an overflow error will not occur and the new message will be moved into RXB1 regardless of the acceptance criteria of RXB1. There are also two programmable acceptance filter masks available, one for each receive buffer (see Section 4.5).
(c) 2007 Microchip Technology Inc.
MCP2510
FIGURE 4-1: RECEIVE BUFFER BLOCK DIAGRAM
Acceptance Mask RXM1
Acceptance Filter RXF2
Acceptance Mask RXM0
Acceptance Filter RXF3
Acceptance Filter RXF0
Acceptance Filter RXF4
A c c e p t
Acceptance Filter RXF1
Acceptance Filter RXF5
A c c e p t
R X B 0
Identifier
M A B
Identifier
R X B 1
Data Field
Data Field
DS21291F-page 22
(c) 2007 Microchip Technology Inc.
MCP2510
FIGURE 4-2: MESSAGE RECEPTION FLOWCHART
Start
No
Detect Start of Message ? Yes
Begin Loading Message into Message Assembly Buffer (MAB)
Generate Error Frame
No
Valid Message Received ? Yes
Yes, meets criteria Yes, meets criteria Message for RXB1 for RXBO Identifier meets a filter criteria ? No Go to Start The CANINTF.RXnIF bit determines if the receive register is empty and able to accept a new message The RXB0CTRL.BUKT bit determines if RXB0 can roll over into RXB1 if it is full Is CANINTF.RX0IF=0 ? Yes Move message into RXB0 No Is Yes RXB0CTRL.BUKT=1 ? No Generate Overflow Error: Set EFLG.RX0OVR Is Generate Overflow Error: No CANINTF.RX1IF = 0 Set EFLG.RX1OVR ? Yes Is No CANINTE.ERRIE=1 ? Yes Go to Start Set RXB0CTRL.FILHIT <2:0> according to which filter criteria was met Move message into RXB1
Set CANINTF.RX0IF=1
Set RXB0CTRL.FILHIT <0> according to which filter criteria
Set CANINTF.RX1IF=1
CANINTE.RX0IE=1? No
Yes
Generate Interrupt on INT RXB0 Set CANSTAT <3:0> according to which receive buffer the message was loaded into RXB1
Yes
CANINTE.RX1IE=1?
No Yes
ARE BFPCTRL.B1BFM=1 AND BF1CTRL.B1BFE=1 ?
ARE BFPCTRL.B0BFM=1 AND BF1CTRL.B0BFE=1 ?
Yes Set RXBF0 Pin = 0
Set RXBF1 Pin = 0
No
No
(c) 2007 Microchip Technology Inc.
DS21291F-page 23
MCP2510
REGISTER 4-1: RXB0CTRL - RECEIVE BUFFER 0 CONTROL REGISTER (ADDRESS: 60h)
U-0 -- bit 7 bit 7 bit 6-5 Unimplemented: Read as '0' RXM<1:0>: Receive Buffer Operating Mode 11 =Turn mask/filters off; receive any message 10 =Receive only valid messages with extended identifiers that meet filter criteria 01 =Receive only valid messages with standard identifiers that meet filter criteria 00 =Receive all valid messages using either standard or extended identifiers that meet filter criteria Unimplemented: Read as '0' RXRTR: Received Remote Transfer Request 1 = Remote Transfer Request Received 0 = No Remote Transfer Request Received BUKT: Rollover Enable 1 = RXB0 message will rollover and be written to RXB1 if RXB0 is full 0 = Rollover disabled BUKT1: Read Only Copy of BUKT Bit (used internally by the MCP2510). FILHIT<0>: Filter Hit - indicates which acceptance filter enabled reception of message 1 = Acceptance Filter 1 (RXF1) 0 = Acceptance Filter 0 (RXF0) Note: If a rollover from RXB0 to RXB1 occurs, the FILHIT bit will reflect the filter that accepted the message that rolled over R/W-0 RXM1 R/W-0 RXM0 U-0 -- R-0 RXRTR R/W-0 BUKT R-0 BUKT1 R-0 FILHIT0 bit 0
bit 4 bit 3
bit 2
bit 1 bit 0
Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 24
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 4-2: RXB1CTRL - RECEIVE BUFFER 1 CONTROL REGISTER (ADDRESS: 70h)
U-0 -- bit 7 bit 7 bit 6-5 Unimplemented: Read as '0' RXM<1:0>: Receive Buffer Operating Mode 11 =Turn mask/filters off; receive any message 10 =Receive only valid messages with extended identifiers that meet filter criteria 01 =Receive only valid messages with standard identifiers that meet filter criteria 00 =Receive all valid messages using either standard or extended identifiers that meet filter criteria Unimplemented: Read as '0' RXRTR: Received Remote Transfer Request 1 = Remote Transfer Request Received 0 = No Remote Transfer Request Received FILHIT<2:0>: Filter Hit - indicates which acceptance filter enabled reception of message 101 = Acceptance Filter 5 (RXF5) 100 = Acceptance Filter 4 (RXF4) 011 = Acceptance Filter 3 (RXF3) 010 = Acceptance Filter 2 (RXF2) 001 = Acceptance Filter 1 (RXF1) (Only if BUKT bit set in RXB0CTRL) 000 = Acceptance Filter 0 (RXF0) (Only if BUKT bit set in RXB0CTRL) Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R/W-0 RXM1 R/W-0 RXM0 U-0 -- R-0 RXRTR R-0 FILHIT2 R-0 FILHIT1 R-0 FILHIT0 bit 0
bit 4 bit 3
bit 2-0
(c) 2007 Microchip Technology Inc.
DS21291F-page 25
MCP2510
REGISTER 4-3: BFPCTRL - RXNBF PIN CONTROL AND STATUS REGISTER (ADDRESS: 0Ch)
U-0 -- bit 7 bit 7 bit 6 bit 5 bit 4 bit 3 Unimplemented: Read as '0' Unimplemented: Read as '0' B1BFS: RX1BF Pin State (digital output mode only) - Reads as `0' when RX1BF is configured as interrupt pin B0BFS: RX0BF Pin State (digital output mode only) - Reads as `0' when RX0BF is configured as interrupt pin B1BFE: RX1BF Pin Function Enable 1 = Pin function enabled, operation mode determined by B1BFM bit 0 = Pin function disabled, pin goes to high impedance state B0BFE: RX0BF Pin Function Enable 1 = Pin function enabled, operation mode determined by B0BFM bit 0 = Pin Function disabled, pin goes to high impedance state B1BFM: RX1BF Pin Operation Mode 1 = Pin is used as interrupt when valid message loaded into RXB1 0 = Digital output mode B0BFM: RX0BF Pin Operation Mode 1 = Pin is used as interrupt when valid message loaded into RXB0 0 = Digital output mode Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown U-0 -- R/W-0 B1BFS R/W-0 B0BFS R/W-0 B1BFE R/W-0 B0BFE R/W-0 B1BFM R/W-0 B0BFM bit 0
bit 2
bit 1
bit 0
REGISTER 4-4:
RXBNSIDH - RECEIVE BUFFER N STANDARD IDENTIFIER HIGH (ADDRESS: 61h, 71h)
R-x SID10 bit 7 R-x SID9 R-x SID8 R-x SID7 R-x SID6 R-x SID5 R-x SID4 R-x SID3 bit 0
bit 7-0
SID<10:3>: Standard Identifier Bits <10:3> These bits contain the eight most significant bits of the Standard Identifier for the received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 26
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 4-5: RXBNSIDL - RECEIVE BUFFER N STANDARD IDENTIFIER LOW (ADDRESS: 62h, 72h)
R-x SID2 bit 7 bit 7-5 R-x SID1 R-x SID0 R-x SRR R-x IDE U-0 -- R-x EID17 R-x EID16 bit 0
SID<2:0>: Standard Identifier Bits <2:0> These bits contain the three least significant bits of the Standard Identifier for the received message SRR: Standard Frame Remote Transmit Request Bit (valid only if IDE bit = `0') 1 = Standard Frame Remote Transmit Request Received 0 = Standard Data Frame Received IDE: Extended Identifier Flag This bit indicates whether the received message was a Standard or an Extended Frame 1 = Received message was an Extended Frame 0 = Received message was a Standard Frame Unimplemented: Reads as '0' EID<17:16>: Extended Identifier Bits <17:16> These bits contain the two most significant bits of the Extended Identifier for the received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
bit 4
bit 3
bit 2 bit 1-0
REGISTER 4-6:
RXBNEID8 - RECEIVE BUFFER N EXTENDED IDENTIFIER MID (ADDRESS: 63h, 73h)
R-x EID15 bit 7 R-x EID14 R-x EID13 R-x EID12 R-x EID11 R-x EID10 R-x EID9 R-x EID8 bit 0
bit 7-0
EID<15:8>: Extended Identifier Bits <15:8> These bits hold bits 15 through 8 of the Extended Identifier for the received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
(c) 2007 Microchip Technology Inc.
DS21291F-page 27
MCP2510
REGISTER 4-7: RXBNEID0 - RECEIVE BUFFER N EXTENDED IDENTIFIER LOW (ADDRESS: 64h, 74h)
R-x EID7 bit 7 bit 7-0 R-x EID6 R-x EID5 R-x EID4 R-x EID3 R-x EID2 R-x EID1 R-x EID0 bit 0
EID<7:0>: Extended Identifier Bits <7:0> These bits hold the least significant eight bits of the Extended Identifier for the received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 4-8:
RXBNDLC - RECEIVE BUFFER N DATA LENGTH CODE (ADDRESS: 65h, 75h)
U-0 -- bit 7 R-x RTR R-x RB1 R-x RB0 R-x DLC3 R-x DLC2 R-x DLC1 R-x DLC0 bit 0
bit 7 bit 6
Unimplemented: Reads as '0' RTR: Extended Frame Remote Transmission Request Bit (valid only when RXBnSIDL.IDE = 1) 1 = Extended Frame Remote Transmit Request Received 0 = Extended Data Frame Received RB1: Reserved Bit 1 RB0: Reserved Bit 0 DLC<3:0>: Data Length Code Indicates number of data bytes that were received Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
bit 5 bit 4 bit 3-0
REGISTER 4-9:
RXBNDM - RECEIVE BUFFER N DATA FIELD BYTE M (ADDRESS: 66h-6Dh, 76h-7Dh)
R-x RBNDm7 bit 7 R-x RBNDm6 R-x RBNDm5 R-x RBNDm4 R-x RBNDm3 R-x RBNDm2 R-x RBNDm1 R-x RBNDm0 bit 0
bit 7-0
RBNDm7:RBNDm0: Receive Buffer N Data Field Byte m Eight bytes containing the data bytes for the received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 28
(c) 2007 Microchip Technology Inc.
MCP2510
4.5 Message Acceptance Filters and Masks
000 and 001 can only occur if the BUKT bit (see Table 4-1) is set in the RXB0CTRL register allowing RXB0 messages to roll over into RXB1. RXB0CTRL contains two copies of the BUKT bit and the FILHIT<0> bit. The coding of the BUKT bit enables these three bits to be used similarly to the RXB1CTRL.FILHIT bits and to distinguish a hit on filter RXF0 and RXF1 in either RXB0 or after a roll over into RXB1. 111 = Acceptance Filter 1 (RXF1) 110 = Acceptance Filter 0 (RXF0) 001 = Acceptance Filter 1 (RXF1) 000 = Acceptance Filter 0 Note:
The Message Acceptance Filters And Masks are used to determine if a message in the message assembly buffer should be loaded into either of the receive buffers (see Figure 4-3). Once a valid message has been received into the MAB, the identifier fields of the message are compared to the filter values. If there is a match, that message will be loaded into the appropriate receive buffer. The filter masks (see Register 4-10 through Register 4-17) are used to determine which bits in the identifier are examined with the filters. A truth table is shown below in Table 4-1 that indicates how each bit in the identifier is compared to the masks and filters to determine if a the message should be loaded into a receive buffer. The mask essentially determines which bits to apply the acceptance filters to. If any mask bit is set to a zero, then that bit will automatically be accepted regardless of the filter bit.
If the BUKT bit is clear, there are six codes corresponding to the six filters. If the BUKT bit is set, there are six codes corresponding to the six filters plus two additional codes corresponding to RXF0 and RXF1 filters that roll over into RXB1. If more than one acceptance filter matches, the FILHIT bits will encode the binary value of the lowest numbered filter that matched. In other words, if filter RXF2 and filter RXF4 match, FILHIT will be loaded with the value for RXF2. This essentially prioritizes the acceptance filters with a lower number filter having higher priority. Messages are compared to filters in ascending order of filter number. The mask and filter registers can only be modified when the MCP2510 is in configuration mode (see Section 9.0).
TABLE 4-1:
Mask Bit n 0 1 1 1 1 Note:
FILTER/MASK TRUTH TABLE
Filter Bit n X 0 0 1 1 Message Identifier bit n001 X 0 1 0 1 Accept or reject bit n Accept Accept Reject Reject Accept
X = don't care
As shown in the Receive Buffers Block Diagram (Figure 4-1), acceptance filters RXF0 and RXF1, and filter mask RXM0 are associated with RXB0. Filters RXF2, RXF3, RXF4, and RXF5 and mask RXM1 are associated with RXB1. When a filter matches and a message is loaded into the receive buffer, the filter number that enabled the message reception is loaded into the RXBNCTRL register FILHIT bit(s). For RXB1 the RXB1CTRL register contains the FILHIT<2:0> bits. They are coded as follows: 101 = Acceptance Filter 5 (RXF5) 100 = Acceptance Filter 4 (RXF4) 011 = Acceptance Filter 3 (RXF3) 010 = Acceptance Filter 2 (RXF2) 001 = Acceptance Filter 1 (RXF1) 000 = Acceptance Filter 0 (RXF0)
(c) 2007 Microchip Technology Inc.
DS21291F-page 29
MCP2510
FIGURE 4-3: MESSAGE ACCEPTANCE MASK AND FILTER OPERATION
Acceptance Filter Register RXFn0 RXMn0 RXMn1 RxRqst Acceptance Mask Register
RXFn1
RXFnn
RXMnn
Message Assembly Buffer Identifier
REGISTER 4-10:
RXFNSIDH - ACCEPTANCE FILTER N STANDARD IDENTIFIER HIGH (ADDRESS: 00h, 04h, 08h, 10h, 14h, 18h)
R/W-x SID10 bit 7 R/W-x SID9 R/W-x SID8 R/W-x SID7 R/W-x SID6 R/W-x SID5 R/W-x SID4 R/W-x SID3 bit 0
bit 7-0
SID<10:3>: Standard Identifier Filter Bits <10:3> These bits hold the filter bits to be applied to bits <10:3> of the Standard Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 30
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 4-11: RXFNSIDL - ACCEPTANCE FILTER N STANDARD IDENTIFIER LOW (ADDRESS: 01h, 05h, 09h, 11h, 15h, 19h)
R/W-x SID2 bit 7 bit 7-5 R/W-x SID1 R/W-x SID0 U-0 -- R/W-x EXIDE U-0 -- R/W-x EID17 R/W-x EID16 bit 0
SID<2:0>: Standard Identifier Filter Bits <2:0> These bits hold the filter bits to be applied to bits <2:0> of the Standard Identifier portion of a received message Unimplemented: Reads as '0' EXIDE: Extended Identifier Enable 1 = Filter is applied only to Extended Frames 0 = Filter is applied only to Standard Frames Unimplemented: Reads as '0 EID<17:16>: Exended Identifier Filter Bits <17:16> These bits hold the filter bits to be applied to bits <17:16> of the Extended Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
bit 4 bit 3
bit 2 bit 1-0
REGISTER 4-12:
RXFNEID8 - ACCEPTANCE FILTER N EXTENDED IDENTIFIER HIGH (ADDRESS: 02h, 06h, 0Ah, 12h, 16h, 1Ah)
R/W-x EID15 bit 7 R/W-x EID14 R/W-x EID13 R/W-x EID12 R/W-x EID11 R/W-x EID10 R/W-x EID9 R/W-x EID8 bit 0
bit 7-0
EID<15:8>: Extended Identifier Bits <15:8> These bits hold the filter bits to be applied to bits <15:8> of the Extended Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
(c) 2007 Microchip Technology Inc.
DS21291F-page 31
MCP2510
REGISTER 4-13: RXFNEID0 - ACCEPTANCE FILTER N EXTENDED IDENTIFIER LOW (ADDRESS: 03h, 07h, 0Bh, 13h, 17h, 1Bh)
R/W-x EID7 bit 7 bit 7-0 R/W-x EID6 R/W-x EID5 R/W-x EID4 R/W-x EID3 R/W-x EID2 R/W-x EID1 R/W-x EID0 bit 0
EID<7:0>: Extended Identifier Bits <7:0> These bits hold the filter bits to be applied to the bits <7:0> of the Extended Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 4-14:
RXMNSIDH - ACCEPTANCE FILTER MASK N STANDARD IDENTIFIER HIGH (ADDRESS: 20h, 24h)
R/W-x SID10 bit 7 R/W-x SID9 R/W-x SID8 R/W-x SID7 R/W-x SID6 R/W-x SID5 R/W-x SID4 R/W-x SID3 bit 0
bit 7-0
SID<10:3>: Standard Identifier Mask Bits <10:3> These bits hold the mask bits to be applied to bits <10:3> of the Standard Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 4-15:
RXMNSIDL - ACCEPTANCE FILTER MASK N STANDARD IDENTIFIER LOW (ADDRESS: 21h, 25h)
R/W-x SID2 bit 7 R/W-x SID1 R/W-x SID0 U-0 -- U-0 -- U-0 -- R/W-x EID17 R/W-x EID16 bit 0
bit 7-5
SID<2:0>: Standard Identifier Mask Bits <2:0> These bits hold the mask bits to be applied to bits<2:0> of the Standard Identifier portion of a received message Unimplemented: Reads as '0' EID<17:16>: Extended Identifier Mask Bits <17:16> These bits hold the mask bits to be applied to bits <17:16> of the Extended Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
bit 4-2 bit 1-0
DS21291F-page 32
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 4-16: RXMNEID8 - ACCEPTANCE FILTER MASK N EXTENDED IDENTIFIER HIGH (ADDRESS: 22h, 26h)
R/W-x EID15 bit 7 bit 7-0 R/W-x EID14 R/W-x EID13 R/W-x EID12 R/W-x EID11 R/W-x EID10 R/W-x EID9 R/W-x EID8 bit 0
EID<15:8>: Extended Identifier Bits <15:8> These bits hold the filter bits to be applied to bits <15:8> of the Extended Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 4-17:
RXMNEID0 - ACCEPTANCE FILTER MASK N EXTENDED IDENTIFIER LOW (ADDRESS: 23h, 27h)
R/W-x EID7 bit 7 R/W-x EID6 R/W-x EID5 R/W-x EID4 R/W-x EID3 R/W-x EID2 R/W-x EID1 R/W-x EID0 bit 0
bit 7-0
EID<7:0>: Extended Identifier Mask Bits <7:0> These bits hold the mask bits to be applied to the bits <7:0> of the Extended Identifier portion of a received message Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
(c) 2007 Microchip Technology Inc.
DS21291F-page 33
MCP2510
NOTES:
DS21291F-page 34
(c) 2007 Microchip Technology Inc.
MCP2510
5.0 BIT TIMING
All nodes on a given CAN bus must have the same nominal bit rate. The CAN protocol uses Non Return to Zero (NRZ) coding which does not encode a clock within the data stream. Therefore, the receive clock must be recovered by the receiving nodes and synchronized to the transmitters clock. As oscillators and transmission time may vary from node to node, the receiver must have some type of Phase Lock Loop (PLL) synchronized to data transmission edges to synchronize and maintain the receiver clock. Since the data is NRZ coded, it is necessary to include bit stuffing to ensure that an edge occurs at least every six bit times, to maintain the Digital Phase Lock Loop (DPLL) synchronization. The bit timing of the MCP2510 is implemented using a DPLL that is configured to synchronize to the incoming data, and provide the nominal timing for the transmitted data. The DPLL breaks each bit time into multiple segments made up of minimal periods of time called the time quanta (TQ). Bus timing functions executed within the bit time frame, such as synchronization to the local oscillator, network transmission delay compensation, and sample point positioning, are defined by the programmable bit timing logic of the DPLL. All devices on the CAN bus must use the same bit rate. However, all devices are not required to have the same master oscillator clock frequency. For the different clock frequencies of the individual devices, the bit rate has to be adjusted by appropriately setting the baud rate prescaler and number of time quanta in each segment. The nominal bit rate is the number of bits transmitted per second assuming an ideal transmitter with an ideal oscillator, in the absence of resynchronization. The nominal bit rate is defined to be a maximum of 1 Mb/s. Nominal Bit Time is defined as: TBIT = 1 / NOMlNAL BlT RATE The nominal bit time can be thought of as being divided into separate non-overlapping time segments. These segments are shown in Figure 5-1. Synchronization Segment (Sync_Seg) Propagation Time Segment (Prop_Seg) Phase Buffer Segment 1 (Phase_Seg1) Phase Buffer Segment 2 [Phase_Seg2)
Nominal Bit Time = TQ * (Sync_Seg + Prop_Seg + Phase_Seg1 + Phase_Seg2) The time segments and also the nominal bit time are made up of integer units of time called time quanta or TQ (see Figure 5-1). By definition, the nominal bit time is programmable from a minimum of 8 TQ to a maximum of 25 TQ. Also, by definition the minimum nominal bit time is 1 s, corresponding to a maximum 1 Mb/s rate.
FIGURE 5-1:
BIT TIME PARTITIONING
Input Signal
Sync
Prop Segment
Phase Segment 1 Sample Point
Phase Segment 2
TQ
(c) 2007 Microchip Technology Inc.
DS21291F-page 35
MCP2510
5.1 Time Quanta
The Time Quanta (TQ) is a fixed unit of time derived from the oscillator period. There is a programmable baud-rate prescaler, with integral values ranging from 1 to 64, in addition to a fixed divide by two for clock generation. Time quanta is defined as: T Q = 2* ( Baud Rate + 1 )*TOSC where Baud Rate is the binary value represented by CNF1.BRP<5:0> For some examples: If FOSC = 16 MHz, BRP<5:0> = 00h, and Nominal Bit Time = 8 TQ; then TQ= 125 nsec and Nominal Bit Rate = 1 Mb/s If FOSC = 20 MHz, BRP<5:0> = 01h, and Nominal Bit Time = 8 TQ; then TQ= 200 nsec and Nominal Bit Rate = 625 Kb/s If FOSC = 25 MHz, BRP<5:0> = 3Fh, and Nominal Bit Time = 25 TQ; then TQ = 5.12 sec and Nominal Bit Rate = 7.8 Kb/s The frequencies of the oscillators in the different nodes must be coordinated in order to provide a system-wide specified nominal bit time. This means that all oscillators must have a TOSC that is a integral divisor of TQ. It should also be noted that although the number of TQ is programmable from 4 to 25, the usable minimum is 6 TQ. Attempting to a bit time of less than 6 TQ in length is not guaranteed to operate correctly The total delay is calculated from the following individual delays: - 2 * physical bus end to end delay; TBUS - 2 * input comparator delay; TCOMP (depends on application circuit) - 2 * output driver delay; TDRIVE (depends on application circuit) - 1 * input to output of CAN controller; TCAN (maximum defined as 1 TQ + delay ns) - TPROPOGATION = 2 * (TBUS + TCOMP + TDRIVE) + TCAN - Prop_Seg = TPROPOGATION / TQ
5.4
Phase Buffer Segments
The Phase Buffer Segments are used to optimally locate the sampling point of the received bit within the nominal bit time. The sampling point occurs between phase segment 1 and phase segment 2. These segments can be lengthened or shortened by the resynchronization process (see Section 5.7.2). Thus, the variation of the values of the phase buffer segments represent the DPLL functionality. The end of phase segment 1 determines the sampling point within a bit time. phase segment 1 is programmable from 1 TQ to 8 TQ in duration. Phase segment 2 provides delay before the next transmitted data transition and is also programmable from 1 TQ to 8 TQ in duration (however due to IPT requirements the actual minimum length of phase segment 2 is 2 TQ - see Section 5.6 below), or it may be defined to be equal to the greater of phase segment 1 or the Information Processing Time (IPT). (see Section 5.6).
5.2
Synchronization Segment
5.5
Sample Point
This part of the bit time is used to synchronize the various CAN nodes on the bus. The edge of the input signal is expected to occur during the sync segment. The duration is 1 TQ.
5.3
Propagation Segment
This part of the bit time is used to compensate for physical delay times within the network. These delay times consist of the signal propagation time on the bus line and the internal delay time of the nodes. The delay is calculated as being the round trip time from transmitter to receiver (twice the signal's propagation time on the bus line), the input comparator delay, and the output driver delay. The length of the Propagation Segment can be programmed from 1 TQ to 8 TQ by setting the PRSEG2:PRSEG0 bits of the CNF2 register (Register 5-2).
The Sample Point is the point of time at which the bus level is read and value of the received bit is determined. The Sampling point occurs at the end of phase segment 1. If the bit timing is slow and contains many TQ, it is possible to specify multiple sampling of the bus line at the sample point. The value of the received bit is determined to be the value of the majority decision of three values. The three samples are taken at the sample point, and twice before with a time of TQ/2 between each sample.
5.6
Information Processing Time
The Information Processing Time (IPT) is the time segment, starting at the sample point, that is reserved for calculation of the subsequent bit level. The CAN specification defines this time to be less than or equal to 2 TQ. The MCP2510 defines this time to be 2 TQ. Thus, phase segment 2 must be at least 2 TQ long.
DS21291F-page 36
(c) 2007 Microchip Technology Inc.
MCP2510
5.7 Synchronization
To compensate for phase shifts between the oscillator frequencies of each of the nodes on the bus, each CAN controller must be able to synchronize to the relevant signal edge of the incoming signal. Synchronization is the process by which the DPLL function is implemented. When an edge in the transmitted data is detected, the logic will compare the location of the edge to the expected time (Sync Seg). The circuit will then adjust the values of phase segment 1 and phase segment 2 as necessary. There are two mechanisms used for synchronization. The phase error of an edge is given by the position of the edge relative to Sync Seg, measured in TQ. The phase error is defined in magnitude of TQ as follows: * e = 0 if the edge lies within SYNCESEG * e > 0 if the edge lies before the SAMPLE POINT * e < 0 if the edge lies after the SAMPLE POINT of the previous bit If the magnitude of the phase error is less than or equal to the programmed value of the synchronization jump width, the effect of a resynchronization is the same as that of a hard synchronization. If the magnitude of the phase error is larger than the synchronization jump width, and if the phase error is positive, then phase segment 1 is lengthened by an amount equal to the synchronization jump width. If the magnitude of the phase error is larger than the resynchronization jump width, and if the phase error is negative, then phase segment 2 is shortened by an amount equal to the synchronization jump width.
5.7.1
HARD SYNCHRONIZATION
Hard Synchronization is only done when there is a recessive to dominant edge during a BUS IDLE condition, indicating the start of a message. After hard synchronization, the bit time counters are restarted with Sync Seg. Hard synchronization forces the edge which has occurred to lie within the synchronization segment of the restarted bit time. Due to the rules of synchronization, if a hard synchronization occurs there will not be a resynchronization within that bit time.
5.7.3
SYNCHRONIZATION RULES
5.7.2
RESYNCHRONIZATION
As a result of Resynchronization, phase segment 1 may be lengthened or phase segment 2 may be shortened. The amount of lengthening or shortening of the phase buffer segments has an upper bound given by the Synchronization Jump Width (SJW). The value of the SJW will be added to phase segment 1 (see Figure 5-2) or subtracted from phase segment 2 (see Figure 5-3). The SJW represents the loop filtering of the DPLL. The SJW is programmable between 1 TQ and 4 TQ. Clocking information will only be derived from recessive to dominant transitions. The property that only a fixed maximum number of successive bits have the same value ensures resynchronization to the bit stream during a frame.
* Only one synchronization within one bit time is allowed * An edge will be used for synchronization only if the value detected at the previous sample point (previously read bus value) differs from the bus value immediately after the edge * All other recessive to dominant edges fulfilling rules 1 and 2 will be used for resynchronization with the exception that a node transmitting a dominant bit will not perform a resynchronization as a result of a recessive to dominant edge with a positive phase error
FIGURE 5-2:
Input Signal
LENGTHENING A BIT PERIOD
Sync
Prop Segment
Phase Segment 1
SJW
Phase Segment 2
Sample Point
Nominal Bit Length
Actual Bit Length
TQ
(c) 2007 Microchip Technology Inc.
DS21291F-page 37
MCP2510
FIGURE 5-3:
Input Signal
SHORTENING A BIT PERIOD
Sync
Prop Segment
Phase Segment 1
Phase Segment 2
SJW
Sample Point TQ
Actual Bit Length
Nominal Bit Length
5.8
Programming Time Segments
5.9
Oscillator Tolerance
Some requirements for programming of the time segments: * Prop Seg + Phase Seg 1 >= Phase Seg 2 * Prop Seg + Phase Seg 1 >= TDELAY * Phase Seg 2 > Sync Jump Width For example, assuming that a 125 kHz CAN baud rate with FOSC = 20 MHz is desired: TOSC = 50 nsec, choose BRP<5:0> = 04h, then TQ = 500 nsec. To obtain 125 kHz, the bit time must be 16 TQ. Typically, the sampling of the bit should take place at about 60-70% of the bit time, depending on the system parameters. Also, typically, the TDELAY is 1-2 TQ. Sync Seg = 1 TQ; Prop Seg = 2 TQ; So setting Phase Seg 1 = 7 TQ would place the sample at 10 TQ after the transition. This would leave 6 TQ for Phase Seg 2. Since Phase Seg 2 is 6, by the rules, SJW could be the maximum of 4 TQ. However, normally a large SJW is only necessary when the clock generation of the different nodes is inaccurate or unstable, such as using ceramic resonators. So an SJW of 1 is typically enough.
The bit timing requirements allow ceramic resonators to be used in applications with transmission rates of up to 125 kbit/sec, as a rule of thumb. For the full bus speed range of the CAN protocol, a quartz oscillator is required. A maximum node-to-node oscillator variation of 1.7% is allowed.
DS21291F-page 38
(c) 2007 Microchip Technology Inc.
MCP2510
5.10 Bit Timing Configuration Registers
ting this bit to a `1' causes the bus to be sampled three times; twice at TQ/2 before the sample point, and once at the normal sample point (which is at the end of phase segment 1). The value of the bus is determined to be the value read during at least two of the samples. If the SAM bit is set to a `0' then the RXCAN pin is sampled only once at the sample point. The BTLMODE bit controls how the length of phase segment 2 is determined. If this bit is set to a `1' then the length of phase segment 2 is determined by the PHSEG2<2:0> bits of CNF3 (see Section 5.10.3). If the BTLMODE bit is set to a `0' then the length of phase segment 2 is the greater of phase segment 1 and the information processing time (which is fixed at 2 TQ for the MCP2510).
The configuration registers (CNF1, CNF2, CNF3) control the bit timing for the CAN bus interface. These registers can only be modified when the MCP2510 is in configuration mode (see Section 9.0).
5.10.1
CNF1
The BRP<5:0> bits control the baud rate prescaler. These bits set the length of TQ relative to the OSC1 input frequency, with the minimum length of TQ being 2 OSC1 clock cycles in length (when BRP<5:0> are set to 000000). The SJW<1:0> bits select the synchronization jump width in terms of number of TQ's.
5.10.3
CNF3
5.10.2
CNF2
The PRSEG<2:0> bits set the length, in TQ's, of the propagation segment. The PHSEG1<2:0> bits set the length, in TQ's, of phase segment 1. The SAM bit controls how many times the RXCAN pin is sampled. Set-
The PHSEG2<2:0> bits set the length, in TQ's, of Phase Segment 2, if the CNF2.BTLMODE bit is set to a `1'. If the BTLMODE bit is set to a `0' then the PHSEG2<2:0> bits have no effect.
REGISTER 5-1:
CNF1 - CONFIGURATION REGISTER1 (ADDRESS: 2Ah)
R/W-0 SJW1 bit 7 R/W-0 SJW0 R/W-0 BRP5 R/W-0 BRP4 R/W-0 BRP3 R/W-0 BRP2 R/W-0 BRP1 R/W-0 BRP0 bit 0
bit 7-6
SJW<1:0>: Synchronization Jump Width Length 11 = Length = 4 x TQ 10 = Length = 3 x TQ 01 = Length = 2 x TQ 00 = Length = 1 x TQ BRP<5:0>: Baud Rate Prescaler TQ = 2 x (BRP + 1) / FOSC Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
bit 5-0
(c) 2007 Microchip Technology Inc.
DS21291F-page 39
MCP2510
REGISTER 5-2: CNF2 - CONFIGURATION REGISTER2 (ADDRESS: 29h)
R/W-0 BTLMODE bit 7 bit 7 BTLMODE: Phase Segment 2 Bit Time Length 1 = Length of Phase Seg 2 determined by PHSEG22:PHSEG20 bits of CNF3 0 = Length of Phase Seg 2 is the greater of Phase Seg 1 and IPT (2TQ) SAM: Sample Point Configuration 1 = Bus line is sampled three times at the sample point 0 = Bus line is sampled once at the sample point PHSEG1<2:0>: Phase Segment 1 Length (PHSEG1 + 1) x TQ PRSEG<2:0>: Propagation Segment Length (PRSEG + 1) x TQ Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R/W-0 SAM R/W-0 R/W-0 R/W-0 R/W-0 PRSEG2 R/W-0 PRSEG1 R/W-0 PRSEG0 bit 0 PHSEG12 PHSEG11 PHSEG10
bit 6
bit 5-3 bit 2-0
REGISTER 5-3:
CNF3 - CONFIGURATION REGISTER 3 (ADDRESS: 28h)
U-0 -- bit 7 R/W-0 WAKFIL U-0 -- U-0 -- U-0 -- R/W-0 PHSEG22 R/W-0 PHSEG21 R/W-0 PHSEG20 bit 0
bit 7 bit 6
Unimplemented: Reads as '0' WAKFIL: Wake-up Filter 1 = Wake-up filter enabled 0 = Wake-up filter disabled Unimplemented: Reads as '0' PHSEG2<2:0>: Phase Segment 2 Length (PHSEG2 + 1) x TQ Note: Minimum valid setting for Phase Segment 2 is 2TQ
bit 5-3 bit 2-0
Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 40
(c) 2007 Microchip Technology Inc.
MCP2510
6.0 ERROR DETECTION
6.6 Error States
The CAN protocol provides sophisticated error detection mechanisms. The following errors can be detected. Detected errors are made public to all other nodes via error frames. The transmission of the erroneous message is aborted and the frame is repeated as soon as possible. Furthermore, each CAN node is in one of the three error states "error-active", "error-passive" or "busoff" according to the value of the internal error counters. The error-active state is the usual state where the bus node can transmit messages and active error frames (made of dominant bits) without any restrictions. In the error-passive state, messages and passive error frames (made of recessive bits) may be transmitted. The bus-off state makes it temporarily impossible for the station to participate in the bus communication. During this state, messages can neither be received nor transmitted.
6.1
CRC Error
With the Cyclic Redundancy Check (CRC), the transmitter calculates special check bits for the bit sequence from the start of a frame until the end of the data field. This CRC sequence is transmitted in the CRC Field. The receiving node also calculates the CRC sequence using the same formula and performs a comparison to the received sequence. If a mismatch is detected, a CRC error has occurred and an error frame is generated. The message is repeated.
6.2
Acknowledge Error
In the acknowledge field of a message, the transmitter checks if the acknowledge slot (which has sent out as a recessive bit) contains a dominant bit. If not, no other node has received the frame correctly. An acknowledge error has occurred; an error frame is generated; and the message will have to be repeated.
6.7
Error Modes and Error Counters
6.3
Form Error
The MCP2510 contains two error counters: the Receive Error Counter (REC) (see Register 6-2), and the Transmit Error Counter (TEC) (see Register 6-1). The values of both counters can be read by the MCU. These counters are incremented or decremented in accordance with the CAN bus specification. The MCP2510 is error-active if both error counters are below the error-passive limit of 128. It is error-passive if at least one of the error counters equals or exceeds 128. It goes to bus-off if the transmit error counter equals or exceeds the bus-off limit of 256. The device remains in this state, until the bus-off recovery sequence is received. The bus-off recovery sequence consists of 128 occurrences of 11 consecutive recessive bits (see Figure 6-1). Note that the MCP2510, after going bus-off, will recover back to error-active, without any intervention by the MCU, if the bus remains idle for 128 X 11 bit times. If this is not desired, the error interrupt service routine should address this. The current error mode of the MCP2510 can be read by the MCU via the EFLG register (Register 6-3). Additionally, there is an error state warning flag bit, EFLG:EWARN, which is set if at least one of the error counters equals or exceeds the error warning limit of 96. EWARN is reset if both error counters are less than the error warning limit.
lf a node detects a dominant bit in one of the four segments including end of frame, interframe space, acknowledge delimiter or CRC delimiter; then a form error has occurred and an error frame is generated. The message is repeated.
6.4
Bit Error
A Bit Error occurs if a transmitter sends a dominant bit and detects a recessive bit or if it sends a recessive bit and detects a dominant bit when monitoring the actual bus level and comparing it to the just transmitted bit. In the case where the transmitter sends a recessive bit and a dominant bit is detected during the arbitration field and the acknowledge slot, no bit error is generated because normal arbitration is occurring.
6.5
Stuff Error
lf, between the start of frame and the CRC delimiter, six consecutive bits with the same polarity are detected, the bit stuffing rule has been violated. A stuff error occurs and an error frame is generated. The message is repeated.
(c) 2007 Microchip Technology Inc.
DS21291F-page 41
MCP2510
FIGURE 6-1: ERROR MODES STATE DIAGRAM
RESET
REC > 127 or TEC > 127
Error-Active 128 occurrences of 11 consecutive "recessive" bits
REC < 127 or TEC < 127
Error-Passive TEC > 255 Bus-Off
REGISTER 6-1:
TEC - TRANSMITTER ERROR COUNTER (ADDRESS: 1Ch)
R-0 TEC7 bit 7 R-0 TEC6 R-0 TEC5 R-0 TEC4 R-0 TEC3 R-0 TEC2 R-0 TEC1 R-0 TEC0 bit 0
bit 7-0
TEC<7:0>: Transmit Error Count Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
REGISTER 6-2:
REC - RECEIVER ERROR COUNTER (ADDRESS: 1Dh)
R-0 REC7 bit 7 R-0 REC6 R-0 REC5 R-0 REC4 R-0 REC3 R-0 REC2 R-0 REC1 R-0 REC0 bit 0
bit 7-0
REC<7:0>: Receive Error Count Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
DS21291F-page 42
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 6-3: EFLG - ERROR FLAG REGISTER (ADDRESS: 2Dh)
R/W-0 RX1OVR bit 7 bit 7 RX1OVR: Receive Buffer 1 Overflow Flag - Set when a valid message is received for RXB1 and CANINTF.RX1IF = 1 - Must be reset by MCU RX0OVR: Receive Buffer 0 Overflow Flag - Set when a valid message is received for RXB0 and CANINTF.RX0IF = 1 - Must be reset by MCU TXBO: Bus-Off Error Flag - Bit set when TEC reaches 255 - Reset after a successful bus recovery sequence TXEP: Transmit Error-Passive Flag - Set when TEC is equal to or greater than 128 - Reset when TEC is less than 128 RXEP: Receive Error-Passive Flag - Set when REC is equal to or greater than 128 - Reset when REC is less than 128 TXWAR: Transmit Error Warning Flag - Set when TEC is equal to or greater than 96 - Reset when TEC is less than 96 RXWAR: Receive Error Warning Flag - Set when REC is equal to or greater than 96 - Reset when REC is less than 96 EWARN: Error Warning Flag - Set when TEC or REC is equal to or greater than 96 (TXWAR or RXWAR = 1) - Reset when both REC and TEC are less than 96 Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R/W-0 RX0OVR R-0 TXBO R-0 TXEP R-0 RXEP R-0 TXWAR R-0 RXWAR R-0 EWARN bit 0
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
(c) 2007 Microchip Technology Inc.
DS21291F-page 43
MCP2510
NOTES:
DS21291F-page 44
(c) 2007 Microchip Technology Inc.
MCP2510
7.0 INTERRUPTS
7.2 Transmit Interrupt
The device has eight sources of interrupts. The CANINTE register contains the individual interrupt enable bits for each interrupt source. The CANINTF register contains the corresponding interrupt flag bit for each interrupt source. When an interrupt occurs the INT pin is driven low by the MCP2510 and will remain low until the Interrupt is cleared by the MCU. An Interrupt can not be cleared if the respective condition still prevails. It is recommended that the bit modify command be used to reset flag bits in the CANINTF register rather than normal write operations. This is to prevent unintentionally changing a flag that changes during the write command, potentially causing an interrupt to be missed. It should be noted that the CANINTF flags are read/ write and an Interrupt can be generated by the MCU setting any of these bits, provided the associated CANINTE bit is also set. When the Transmit Interrupt is enabled (CANINTE.TXNIE = 1) an Interrupt will be generated on the INT pin when the associated transmit buffer becomes empty and is ready to be loaded with a new message. The CANINTF.TXNIF bit will be set to indicate the source of the interrupt. The interrupt is cleared by the MCU resetting the TXNIF bit to a `0'.
7.3
Receive Interrupt
When the Receive Interrupt is enabled (CANINTE.RXNIE = 1) an interrupt will be generated on the INT pin when a message has been successfully received and loaded into the associated receive buffer. This interrupt is activated immediately after receiving the EOF field. The CANINTF.RXNIF bit will be set to indicate the source of the interrupt. The interrupt is cleared by the MCU resetting the RXNIF bit to a `0'.
7.4
Message Error Interrupt
7.1
Interrupt Code Bits
The source of a pending interrupt is indicated in the CANSTAT.ICOD (interrupt code) bits as indicated in Register 9-2. In the event that multiple interrupts occur, the INT will remain low until all interrupts have been reset by the MCU, and the CANSTAT.ICOD bits will reflect the code for the highest priority interrupt that is currently pending. Interrupts are internally prioritized such that the lower the ICOD value the higher the interrupt priority. Once the highest priority interrupt condition has been cleared, the code for the next highest priority interrupt that is pending (if any) will be reflected by the ICOD bits (see Table 7-1). Note that only those interrupt sources that have their associated CANINTE enable bit set will be reflected in the ICOD bits.
When an error occurs during transmission or reception of a message the message error flag (CANINTF.MERRF) will be set and, if the CANINTE.MERRE bit is set, an interrupt will be generated on the INT pin. This is intended to be used to facilitate baud rate determination when used in conjunction with listen-only mode.
7.5
Bus Activity Wakeup Interrupt
When the MCP2510 is in sleep mode and the bus activity wakeup interrupt is enabled (CANINTE.WAKIE = 1), an interrupt will be generated on the INT pin, and the CANINTF.WAKIF bit will be set when activity is detected on the CAN bus. This interrupt causes the MCP2510 to exit sleep mode. The interrupt is reset by the MCU clearing the WAKIF bit.
TABLE 7-1:
ICOD<2:0> 000 001 010 011 100 101 110 111
ICOD<2:0> DECODE
Boolean Expression
ERR*WAK*TX0*TX1*TX2*RX0*RX1 ERR ERR*WAK ERR*WAK*TX0 ERR*WAK*TX0*TX1 ERR*WAK*TX0*TX1*TX2 ERR*WAK*TX0*TX1*TX2*RX0 ERR*WAK*TX0*TX1*TX2*RX0*RX1
(c) 2007 Microchip Technology Inc.
DS21291F-page 45
MCP2510
7.6 Error Interrupt
7.6.4 RECEIVER ERROR-PASSIVE
When the error interrupt is enabled (CANINTE.ERRIE = 1) an interrupt is generated on the INT pin if an overflow condition occurs or if the error state of transmitter or receiver has changed. The Error Flag Register (EFLG) will indicate one of the following conditions. The receive error counter has exceeded the error- passive limit of 127 and the device has gone to error- passive state.
7.6.5
TRANSMITTER ERROR-PASSIVE
7.6.1
RECEIVER OVERFLOW
An overflow condition occurs when the MAB has assembled a valid received message (the message meets the criteria of the acceptance filters) and the receive buffer associated with the filter is not available for loading of a new message. The associated EFLG.RXNOVR bit will be set to indicate the overflow condition. This bit must be cleared by the MCU.
The transmit error counter has exceeded the errorpassive limit of 127 and the device has gone to errorpassive state.
7.6.6
BUS-OFF
The transmit error counter has exceeded 255 and the device has gone to bus-off state.
7.7
Interrupt Acknowledge
7.6.2
RECEIVER WARNING
The receive error counter has reached the MCU warning limit of 96.
7.6.3
TRANSMITTER WARNING
Interrupts are directly associated with one or more status flags in the CANINTF register. Interrupts are pending as long as one of the flags is set. Once an interrupt flag is set by the device, the flag can not be reset by the MCU until the interrupt condition is removed.
The transmit error counter has reached the MCU warning limit of 96.
DS21291F-page 46
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 7-1: CANINTE - INTERRUPT ENABLE REGISTER (ADDRESS: 2Bh)
R/W-0 MERRE bit 7 bit 7 MERRE: Message Error Interrupt Enable 1 = Interrupt on error during message reception or transmission 0 = Disabled WAKIE: Wakeup Interrupt Enable 1 = Interrupt on CAN bus activity 0 = Disabled ERRIE: Error Interrupt Enable (multiple sources in EFLG register) 1 = Interrupt on EFLG error condition change 0 = Disabled TX2IE: Transmit Buffer 2 Empty Interrupt Enable 1 = Interrupt on TXB2 becoming empty 0 = Disabled TX1IE: Transmit Buffer 1 Empty Interrupt Enable 1 = Interrupt on TXB1 becoming empty 0 = Disabled TX0IE: Transmit Buffer 0 Empty Interrupt Enable 1 = Interrupt on TXB0 becoming empty 0 = Disabled RX1IE: Receive Buffer 1 Full Interrupt Enable 1 = Interrupt when message received in RXB1 0 = Disabled RX0IE: Receive Buffer 0 Full Interrupt Enable 1 = Interrupt when message received in RXB0 0 = Disabled Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R/W-0 WAKIE R/W-0 ERRIE R/W-0 TX2IE R/W-0 TX1IE R/W-0 TX0IE R/W-0 RX1IE R/W-0 RX0IE bit 0
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
(c) 2007 Microchip Technology Inc.
DS21291F-page 47
MCP2510
REGISTER 7-2: CANINTF - INTERRUPT FLAG REGISTER (ADDRESS: 2Ch)
R/W-0 MERRF bit 7 bit 7 MERRF: Message Error Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending WAKIF: Wakeup Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending ERRIF: Error Interrupt Flag (multiple sources in EFLG register) 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending TX2IF: Transmit Buffer 2 Empty Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending TX1IF: Transmit Buffer 1 Empty Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending TX0IF: Transmit Buffer 0 Empty Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending RX1IF: Receive Buffer 1 Full Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending RX0IF: Receive Buffer 0 Full Interrupt Flag 1 = Interrupt pending (must be cleared by MCU to reset interrupt condition) 0 = No interrupt pending Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R/W-0 WAKIF R/W-0 ERRIF R/W-0 TX2IF R/W-0 TX1IF R/W-0 TX0IF R/W-0 RX1IF R/W-0 RX0IF bit 0
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
DS21291F-page 48
(c) 2007 Microchip Technology Inc.
MCP2510
8.0 OSCILLATOR
8.2 CLKOUT Pin
The MCP2510 is designed to be operated with a crystal or ceramic resonator connected to the OSC1 and OSC2 pins. The MCP2510 oscillator design requires the use of a parallel cut crystal. Use of a series cut crystal may give a frequency out of the crystal manufacturers specifications. A typical oscillator circuit is shown in Figure 8-1. The MCP2510 may also be driven by an external clock source connected to the OSC1 pin as shown in Figure 8-2 and Figure 8-3. The clock out pin is provided to the system designer for use as the main system clock or as a clock input for other devices in the system. The CLKOUT has an internal prescaler which can divide FOSC by 1, 2, 4 and 8. The CLKOUT function is enabled and the prescaler is selected via the CANCNTRL register (see Register 91). The CLKOUT pin will be active upon system reset and default to the slowest speed (divide by 8) so that it can be used as the MCU clock. When sleep mode is requested, the MCP2510 will drive sixteen additional clock cycles on the CLKOUT pin before entering sleep mode. The idle state of the CLKOUT pin in sleep mode is low. When the CLKOUT function is disabled (CANCNTRL.CLKEN = `0') the CLKOUT pin is in a high impedance state. The CLKOUT function is designed to guarantee that thCLKOUT and tlCLKOUT timings are preserved when the CLKOUT pin function is enabled, disabled, or the prescaler value is changed.
8.1
Oscillator Startup Timer
The MCP2510 utilizes an oscillator startup timer (OST), which holds the MCP2510 in reset, to insure that the oscillator has stabilized before the internal state machine begins to operate. The OST maintains reset for the first 128 OSC1 clock cycles after power up, RESET, or wake up from sleep mode occurs. It should be noted that no SPI operations should be attempted until after the OST has expired.
FIGURE 8-1:
CRYSTAL/CERAMIC RESONATOR OPERATION
OSC1 C1 XTAL RF(2) To internal logic SLEEP
C2
RS(1) OSC2
Note 1: A series resistor, RS, may be required for AT strip cut crystals. Note 2: The feedback resistor, RF , is typically in the range of 2 to 10 M.
FIGURE 8-2:
EXTERNAL CLOCK SOURCE
Clock from external system
OSC1
(1) Open
OSC2
Note 1: A resistor to ground may be used to reduce system noise. This may increase system current. Note 2: Duty cycle restrictions must be observed (see Table 12-2).
(c) 2007 Microchip Technology Inc.
DS21291F-page 49
MCP2510
FIGURE 8-3: EXTERNAL SERIES RESONANT CRYSTAL OSCILLATOR CIRCUIT
330 k 74AS04 330 k 74AS04 74AS04 To Other Devices MCP2510 OSC1 0.1 mF XTAL
Note 1: Duty cycle restrictions must be observed (see Table 12-2).
DS21291F-page 50
(c) 2007 Microchip Technology Inc.
MCP2510
9.0 MODES OF OPERATION
be placed into a sleep mode and use the MCP2510 to wake it up upon detecting activity on the bus. Care must be exercised to not enter sleep mode while the MCP2510 is transmitting a message. If sleep mode is requested while transmitting, the transmission will stop without completing and errors will occur on the bus. Also, the message will remain pending and transmit upon wake up. When in sleep mode, the MCP2510 stops its internal oscillator. The MCP2510 will wake-up when bus activity occurs or when the MCU sets, via the SPI interface, the CANINTF.WAKIF bit to `generate' a wake up attempt (the CANINTF.WAKIF bit must also be set in order for the wakeup interrupt to occur). The TXCAN pin will remain in the recessive state while the MCP2510 is in sleep mode. Note that Sleep Mode will be entered immediately, even if a message is currently being transmitted, so it is necessary to insure that all TXREQ bits are clear before setting Sleep Mode. Note: The MCP2510 has five modes of operation. These modes are: 1. 2. 3. 4. 5. Configuration Mode. Normal Mode. Sleep Mode. Listen-Only Mode. Loopback Mode.
The operational mode is selected via the CANCTRL. REQOP bits (see Register 9-1). When changing modes, the mode will not actually change until all pending message transmissions are complete. Because of this, the user must verify that the device has actually changed into the requested mode before further operations are executed. Verification of the current operating mode is done by reading the CANSTAT. OPMODE bits (see Register 9-2).
9.1
Configuration Mode
The MCP2510 must be initialized before activation. This is only possible if the device is in the configuration mode. Configuration mode is automatically selected after powerup or a reset, or can be entered from any other mode by setting the CANTRL.REQOP bits to `100'. When configuration mode is entered all error counters are cleared. Configuration mode is the only mode where the following registers are modifiable: * * * * CNF1, CNF2, CNF3 TXRTSCTRL Acceptance Filter Registers Acceptance Mask Registers
9.2.1
WAKE-UP FUNCTIONS
Only when the CANSTAT.OPMODE bits read as `100' can the initialization be performed, allowing the configuration registers, acceptance mask registers, and the acceptance filter registers to be written. After the configuration is complete, the device can be activated by programming the CANCTRL.REQOP bits for normal operation mode (or any other mode).
The device will monitor the RXCAN pin for activity while it is in sleep mode. If the CANINTE.WAKIE bit is set, the device will wake up and generate an interrupt. Since the internal oscillator is shut down when sleep mode is entered, it will take some amount of time for the oscillator to start up and the device to enable itself to receive messages. The device will ignore the message that caused the wake-up from sleep mode as well as any messages that occur while the device is `waking up.' The device will wake up in listen-only mode. The MCU must set normal mode before the MCP2510 will be able to communicate on the bus. The device can be programmed to apply a low-pass filter function to the RXCAN input line while in internal sleep mode. This feature can be used to prevent the device from waking up due to short glitches on the CAN bus lines. The CNF3.WAKFIL bit enables or disables the filter.
9.2
Sleep Mode
9.3
Listen Only Mode
The MCP2510 has an internal sleep mode that is used to minimize the current consumption of the device. The SPI interface remains active even when the MCP2510 is in sleep mode, allowing access to all registers. To enter sleep mode, the mode request bits are set in the CANCTRL register. The CANSTAT.OPMODE bits indicate whether the device successfully entered sleep mode. These bits should be read after sending the sleep command to the MCP2510. The MCP2510 is active and has not yet entered sleep mode until these bits indicate that sleep mode has been entered. When in internal sleep mode, the wakeup interrupt is still active (if enabled). This is done so the MCU can also
Listen-only mode provides a means for the MCP2510 to receive all messages including messages with errors. This mode can be used for bus monitor applications or for detecting the baud rate in `hot plugging' situations. For auto-baud detection it is necessary that there are at least two other nodes, which are communicating with each other. The baud rate can be detected empirically by testing different values until valid messages are received. The listen-only mode is a silent mode, meaning no messages will be transmitted while in this state, including error flags or acknowledge signals. The filters and masks can be used to allow only particular messages to be loaded into the receive registers, or the filter masks can be set to all zeros to allow a message with any identifier to pass. The error
(c) 2007 Microchip Technology Inc.
DS21291F-page 51
MCP2510
counters are reset and deactivated in this state. The listen-only mode is activated by setting the mode request bits in the CANCTRL register.
9.5
Normal Mode
9.4
Loopback Mode
This mode will allow internal transmission of messages from the transmit buffers to the receive buffers without actually transmitting messages on the CAN bus. This mode can be used in system development and testing. In this mode the ACK bit is ignored and the device will allow incoming messages from itself just as if they were coming from another node. The loopback mode is a silent mode, meaning no messages will be transmitted while in this state, including error flags or acknowledge signals. The TXCAN pin will be in a reccessive state while the device is in this mode. The filters and masks can be used to allow only particular messages to be loaded into the receive registers. The masks can be set to all zeros to provide a mode that accepts all messages. The loopback mode is activated by setting the mode request bits in the CANCTRL register.
This is the standard operating mode of the MCP2510. In this mode the device actively monitors all bus messages and generates acknowledge bits, error frames, etc. This is also the only mode in which the MCP2510 will transmit messages over the CAN bus.
REGISTER 9-1:
CANCTRL - CAN CONTROL REGISTER (ADDRESS: XFh)
R/W-1 REQOP2 bit 7 R/W-1 REQOP1 R/W-1 REQOP0 R/W-0 ABAT U-0 -- R/W-1 CLKEN R/W-1 R/W-1 bit 0 CLKPRE1 CLKPRE0
bit 7-5
REQOP<2:0>: Request Operation Mode 000 = Set Normal Operation Mode 001 = Set Sleep Mode 010 = Set Loopback Mode 011 = Set Listen Only Mode 100 = Set Configuration Mode All other values for REQOP bits are invalid and should not be used Note: On power up, REQOP = b'111' ABAT: Abort All Pending Transmissions 1 = Request abort of all pending transmit buffers 0 = Terminate request to abort all transmissions Unimplemented: Read as '0' CLKEN: CLKOUT Pin Enable 1 = CLKOUT pin enabled 0 = CLKOUT pin disabled (Pin is in high impedance state) CLKPRE <1:0>: CLKOUT Pin Prescaler 00 = FCLKOUT = System Clock/1 01 = FCLKOUT = System Clock/2 10 = FCLKOUT = System Clock/4 11 = FCLKOUT = System Clock/8 Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown
bit 4
bit 3 bit 2
bit 1-0
DS21291F-page 52
(c) 2007 Microchip Technology Inc.
MCP2510
REGISTER 9-2: CANSTAT - CAN STATUS REGISTER (ADDRESS: XEh)
R-1 bit 7 bit 7-5 OPMOD<2:0>: Operation Mode 000 = Device is in Normal Operation Mode 001 = Device is in Sleep Mode 010 = Device is in Loopback Mode 011 = Device is in Listen Only Mode 100 = Device is in Configuration Mode Unimplemented: Read as '0' ICOD<2:0>: Interrupt Flag Code 000 = No Interrupt 001 = Error Interrupt 010 = Wake Up Interrupt 011 = TXB0 Interrupt 100 = TXB1 Interrupt 101 = TXB2 Interrupt 110 = RXB0 Interrupt 111 = RXB1 Interrupt Unimplemented: Read as '0' Legend: R = Readable bit -n = Value at POR W = Writable bit '1' = Bit is set U = Unimplemented bit, read as `0' '0' = Bit is cleared x = Bit is unknown R-0 R-0 U-0 -- R-0 ICOD2 R-0 ICOD1 R-0 ICOD0 U-0 -- bit 0 OPMOD2 OPMOD1 OPMOD0
bit 4 bit 3-1
bit 0
(c) 2007 Microchip Technology Inc.
DS21291F-page 53
MCP2510
NOTES:
DS21291F-page 54
(c) 2007 Microchip Technology Inc.
MCP2510
10.0 REGISTER MAP
The register map for the MCP2510 is shown in Table 10-1. Address locations for each register are determined by using the column (higher order 4 bits) and row (lower order 4 bits) values. The registers have been arranged to optimize the sequential reading and writing of data. Some specific control and status registers allow individual bit modification using the SPI Bit Modify command. The registers that allow this command are shown as shaded locations in Table 10-1. A summary of the MCP2510 control registers is shown in Table 10-2.
TABLE 10-1:
Lower Address Bits 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Note:
CAN CONTROLLER REGISTER MAP
Higher Order Address Bits
x000 xxxx RXF0SIDH RXF0SIDL RXF0EID8 RXF0EID0 RXF1SIDH RXF1SIDL RXF1EID8 RXF1EID0 RXF2SIDH RXF2SIDL RXF2EID8 RXF2EID0 BFPCTRL TXRTSCTRL CANSTAT CANCTRL
x001 xxxx RXF3SIDH RXF3SIDL RXF3EID8 RXF3EID0 RXF4SIDH RXF4SIDL RXF4EID8 RXF4EID0 RXF5SIDH RXF5SIDL RXF5EID8 RXF5EID0 TEC REC CANSTAT CANCTRL
x010 xxxx RXM0SIDH RXM0SIDL RXM0EID8 RXM0EID0 RXM1SIDH RXM1SIDL RXM1EID8 RXM1EID0 CNF3 CNF2 CNF1 CANINTE CANINTF EFLG CANSTAT CANCTRL
x0011 xxxx x100 xxxx x101 xxxx x110 xxxx x111 xxxx TXB0CTRL TXB0SIDH TXB0SIDL TXB0EID8 TXB0EID0 TXB0DLC TXB0D0 TXB0D1 TXB0D2 TXB0D3 TXB0D4 TXB0D5 TXB0D6 TXB0D7 CANSTAT CANCTRL TXB1CTRL TXB1SIDH TXB1SIDL TXB1EID8 TXB1EID0 TXB1DLC TXB1D0 TXB1D1 TXB1D2 TXB1D3 TXB1D4 TXB1D5 TXB1D6 TXB1D7 CANSTAT CANCTRL TXB2CTRL TXB2SIDH TXB2SIDL TXB2EID8 TXB2EID0 TXB2DLC TXB2D0 TXB2D1 TXB2D2 TXB2D3 TXB2D4 TXB2D5 TXB2D6 TXB2D7 CANSTAT CANCTRL RXB0CTRL RXB0SIDH RXB0SIDL RXB0EID8 RXB0EID0 RXB0DLC RXB0D0 RXB0D1 RXB0D2 RXB0D3 RXB0D4 RXB0D5 RXB0D6 RXB0D7 CANSTAT CANCTRL RXB1CTRL RXB1SIDH RXB1SIDL RXB1EID8 RXB1EID0 RXB1DLC RXB1D0 RXB1D1 RXB1D2 RXB1D3 RXB1D4 RXB1D5 RXB1D6 RXB1D7 CANSTAT CANCTRL
Shaded register locations indicate that these allow the user to manipulate individual bits using the `Bit Modify' Command.
TABLE 10-2:
Register Name BFPCTRL TXRTSCTRL CANSTAT CANCTRL TEC REC CNF3 CNF2 CNF1 CANINTE CANINTF EFLG TXB0CTRL TXB1CTRL TXB2CTRL RXB0CTRL RXB1CTRL
CONTROL REGISTER SUMMARY
Bit 7 -- -- Bit 6 -- -- Bit 5 B1BFS B2RTS Bit 4 B0BFS B1RTS -- ABAT Bit 3 B1BFE B0RTS ICOD2 -- Bit 2 B0BFE B2RTSM ICOD1 CLKEN Bit 1 B1BFM B1RTSM ICOD0 Bit 0 B0BFM POR/RST Value --00 0000
Address (Hex) 0C 0D xE xF 1C 1D 28 29 2A 2B 2C 2D 30 40 50 60 70
B0RTSM --xx x000 -- 100- 000-
OPMOD2 OPMOD1 OPMOD0 REQOP2 REQOP1 REQOP0
CLKPRE1 CLKPRE0 1110 -111 0000 0000 0000 0000
Transmit Error Counter Receive Error Counter -- BTLMODE SJW1 MERRE MERRF RX1OVR -- -- -- -- -- WAKFIL SAM SJW0 WAKIE WAKIF RX0OVR ABTF ABTF ABTF RXM1 RSM1 -- -- --
PHSEG22 PHSEG21 PHSEG20 -0-- -000 PRSEG1 BRP1 RX1IE RX1IF RXWAR TXP1 TXP1 TXP1 BUKT FILHIT1 PRSEG0 0000 0000 BRP0 RX0IE RX0IF EWARN TXP0 TXP0 TXP0 FILHIT0 FILHIT0 0000 0000 0000 0000 0000 0000 0000 0000 -000 0-00 -000 0-00 -000 0-00 -00- 0000 -00- 0000
PHSEG12 PHSEG11 PHSEG10 PRSEG2 BRP5 ERRIE ERRIF TXBO MLOA MLOA MLOA RXM0 RXM0 BRP4 TX2IE TX2IF TXEP TXERR TXERR TXERR -- -- BRP3 TX1IE TX1IF RXEP TXREQ TXREQ TXREQ RXRTR RXRTR BRP2 TX0IE TX0IF TXWAR -- -- -- BUKT FILHIT2
(c) 2007 Microchip Technology Inc.
DS21291F-page 55
MCP2510
NOTES:
DS21291F-page 56
(c) 2007 Microchip Technology Inc.
MCP2510
11.0
11.1
SPI INTERFACE
Overview
11.5
Read Status Instruction
The MCP2510 is designed to interface directly with the Serial Peripheral Interface (SPI) port available on many microcontrollers and supports Mode 0,0 and Mode 1,1. Commands and data are sent to the device via the SI pin, with data being clocked in on the rising edge of SCK. Data is driven out by the MCP2510, on the SO line, on the falling edge of SCK. The CS pin must be held low while any operation is performed. Table 11-1 shows the instruction bytes for all operations. Refer to Figure 11-8 and Figure 11-9 for detailed input and output timing diagrams for both Mode 0,0 and Mode 1,1 operation.
The Read Status Instruction allows single instruction access to some of the often used status bits for message reception and transmission. The part is selected by lowering the CS pin and the read status command byte, shown in Figure 11-6, is sent to the MCP2510. After the command byte is sent, the MCP2510 will return eight bits of data that contain the status. If additional clocks are sent after the first eight bits are transmitted, the MCP2510 will continue to output the status bits as long as the CS pin is held low and clocks are provided on SCK. Each status bit returned in this command may also be read by using the standard read command with the appropriate register address.
11.2
Read Instruction
11.6
Bit Modify Instruction
The Read Instruction is started by lowering the CS pin. The read instruction is then sent to the MCP2510 followed by the 8-bit address (A7 through A0). After the read instruction and address are sent, the data stored in the register at the selected address will be shifted out on the SO pin. The internal address pointer is automatically incremented to the next address after each byte of data is shifted out. Therefore it is possible to read the next consecutive register address by continuing to provide clock pulses. Any number of consecutive register locations can be read sequentially using this method. The read operation is terminated by raising the CS pin (Figure 11-2).
The Bit Modify Instruction provides a means for setting or clearing individual bits in specific status and control registers. This command is not available for all registers. See Section 10.0 (register map) to determine which registers allow the use of this command. The part is selected by lowering the CS pin and the Bit Modify command byte is then sent to the MCP2510. After the command byte is sent, the address for the register is sent followed by the mask byte and then the data byte. The mask byte determines which bits in the register will be allowed to change. A `1' in the mask byte will allow a bit in the register to change and a `0' will not. The data byte determines what value the modified bits in the register will be changed to. A `1' in the data byte will set the bit and a `0' will clear the bit, provided that the mask for that bit is set to a `1'. (see Figure 11-1)
11.3
Write Instruction
The Write Instruction is started by lowering the CS pin. The write instruction is then sent to the MCP2510 followed by the address and at least one byte of data. It is possible to write to sequential registers by continuing to clock in data bytes, as long as CS is held low. Data will actually be written to the register on the rising edge of the SCK line for the D0 bit. If the CS line is brought high before eight bits are loaded, the write will be aborted for that data byte, previous bytes in the command will have been written. Refer to the timing diagram in Figure 11-3 for more detailed illustration of the byte write sequence.
11.7
Reset Instruction
11.4
Request To Send (RTS) Instruction
The Reset Instruction can be used to re-initialize the internal registers of the MCP2510 and set configuration mode. This command provides the same functionality, via the SPI interface, as the RESET pin. The Reset instruction is a single byte instruction which requires selecting the device by pulling CS low, sending the instruction byte, and then raising CS. It is highly recommended that the reset command be sent (or the RESET pin be lowered) as part of the power-on initialization sequence. The MCP2510 will be held in reset for 128 FOSC cycles.
The RTS command can be used to initiate message transmission for one or more of the transmit buffers. The part is selected by lowering the CS pin and the RTS command byte is then sent to the MCP2510. As shown in Figure 11-4, the last 3 bits of this command indicate which transmit buffer(s) are enabled to send. This command will set the TxBnCTRL.TXREQ bit for the respective buffer(s). Any or all of the last three bits can be set in a single command. If the RTS command is sent with nnn = 000, the command will be ignored.
(c) 2007 Microchip Technology Inc.
DS21291F-page 57
MCP2510
FIGURE 11-1: BIT MODIFY
Mask byte 0 0 1 1 0 1 0 1
Data byte X X 1 0 X 0 X 1 Previous Register Contents
0 101000 1
Resulting Register 0 1 1 0 0 0 0 1 Contents
TABLE 11-1:
SPI INSTRUCTION SET
Instruction Format 1100 0000 0000 0011 0000 0010 1000 0nnn Description Resets internal registers to default state, set configuration mode Read data from register beginning at selected address Write data to register beginning at selected address Sets TXBnCTRL.TXREQ bit for one or more transmit buffers 1000 0nnn
Request to send for TXB2 Request to send for TXB0 Request to send for TXB1
Instruction Name RESET READ WRITE RTS (Request To Send)
Read Status Bit Modify
1010 0000 0000 0101
Polling command that outputs status bits for transmit/receive functions Bit modify selected registers
FIGURE 11-2:
CS
READ INSTRUCTION
0 SCK
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23
instruction SI 0 0 0 0 0 0 1 1 A7 6
address byte 5 4 3 2 1 A0 don't care data out 7 6 5 4 3 2 1 0
high impedance SO
FIGURE 11-3:
CS
BYTE WRITE INSTRUCTION
0 SCK
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16 17 18 19
20 21 22 23
instruction SI 0 0 0 0 0 0 1 0 A7 6
address byte 5 4 3 2 1 A0 7 6 5
data byte 4 3 2 1 0
high impedance SO
DS21291F-page 58
(c) 2007 Microchip Technology Inc.
MCP2510
FIGURE 11-4: REQUEST TO SEND INSTRUCTION
CS
0 SCK
1
2
3
4
5
6
7
instruction SI 1 0 0 0 0 T2 T1 T0
SO
high impedance
FIGURE 11-5:
CS
BIT MODIFY INSTRUCTION
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 SCK instruction SI address byte mask byte data byte
0 0 0 0 0 1 0 1 A7 6 5 4 3 2 1 A0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
SO
high impedance
Note:
Not all registers can be accessed with this command. See the register map in Section 10.0 for a list of the registers that apply.
FIGURE 11-6:
CS
READ STATUS INSTRUCTION
0 SCK
1
2
3
4
5
6
7
8
9
10 11 12 13 14 15 16 17 18 19 20 21 22 23
instruction SI 1 0 1 0 0 0 0 0 data out 7 6 5 4 3 2 1 0 7 6 5 don't care repeat data out 4 3 2 1 0
SO
high impedance
CANINTF.RX0IF CANINTF.RX1IF TXB0CNTRL.TXREQ CANINTF.TX0IF TXB1CNTRL.TXREQ CANINTF.TX1IF TXB2CNTRL.TXREQ CANINTF.TX2IF
(c) 2007 Microchip Technology Inc.
DS21291F-page 59
MCP2510
FIGURE 11-7: RESET INSTRUCTION
CS
0 SCK
1
2
3
4
5
6
7
instruction SI 1 1 0 0 0 0 0 0
SO
high impedance
FIGURE 11-8:
SPI INPUT TIMING
3
CS 11 1 Mode 1,1 SCK Mode 0,0 4 SI MSB in LSB in 5 6 10 7 2
SO
high impedance
FIGURE 11-9:
SPI OUTPUT TIMING
CS 8 SCK 9 2 Mode 1,1 Mode 0,0 12 13 SO MSB out 14 LSB out
SI
don't care
DS21291F-page 60
(c) 2007 Microchip Technology Inc.
MCP2510
12.0
12.1
ELECTRICAL CHARACTERISTICS
Absolute Maximum Ratings
VDD.............................................................................................................................................................................7.0V All inputs and outputs w.r.t. VSS ..........................................................................................................-0.6V to VDD +1.0V Storage temperature ...............................................................................................................................-65C to +150C Ambient temp. with power applied ..........................................................................................................-65C to +125C Soldering temperature of leads (10 seconds) ....................................................................................................... +300C ESD protection on all pins ...................................................................................................................................................... 4 kV Notice: Stresses above those listed under "Maximum Ratings" may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. Exposure to maximum rating conditions for extended periods may affect device reliability.
(c) 2007 Microchip Technology Inc.
DS21291F-page 61
MCP2510
TABLE 12-1: DC CHARACTERISTICS
Industrial (I): Extended (E): Characteristic Supply Voltage Register Retention Voltage High Level Input Voltage VIH RXCAN SCK, CS, SI, TXnRTS Pins OSC1 RESET Low Level Input Voltage VIL RXCAN,TXnRTS Pins SCK, CS, SI OSC1 RESET Low Level Output Voltage VOL TXCAN RXnBF Pins SO, CLKOUT INT High Level Output Voltage VOH TXCAN, RXnBF Pins SO, CLKOUT INT Input Leakage Current ILI All I/O except OSC1 and TXnRTS pins OSC1 Pin CINT IDD IDDS Note: Internal Capacitance (All Inputs And Outputs) Operating Current Standby Current (Sleep Mode) -1 -5 -- -- -- +1 +5 7 10 5 A A pF mA A TAMB = 25C, fC = 1.0 MHz, VDD = 5.0V (Note) VDD = 5.5V, FOSC = 25 MHz, FCLK = 1 MHz, SO = Open CS, TXnRTS = VDD, Inputs tied to VDD or VSS CS = RESET = VDD, VIN = VSS to VDD VDD -0.7 VDD -0.5 VDD -0.7 -- -- -- -- -- -- -- 0.6 0.6 0.6 0.6 V V V V V V V V IOH = 3.0 mA, VDD = 4.5V, I temp IOH = 400 A, VDD = 4.5V IOH = 1.0 mA, VDD = 4.5V IOL = -6.0 mA, VDD = 4.5V IOL = -8.5 mA, VDD = 4.5V IOL = -2.1 mA, VDD = 4.5V IOL = -1.6 mA, VDD = 4.5V -0.3 -0.3 VSS VSS .15 VDD 0.4 .3 VDD .15 VDD V V V V 2 .7 VDD .85 VDD .85 VDD VDD+1 VDD+1 VDD VDD V V V V Note Min 3.0 2.4 TAMB = -40C to +85C TAMB = -40C to +125C Max 5.5 -- Units V V Note VDD = 3.0V to 5.5V VDD = 4.5V to 5.5V Conditions
DC Characteristics
Param. No. Sym VDD VRET
This parameter is periodically sampled and not 100% tested.
DS21291F-page 62
(c) 2007 Microchip Technology Inc.
MCP2510
TABLE 12-2: OSCILLATOR TIMING CHARACTERISTICS
Industrial (I): Extended (E): Min 1 1 40 62.5 0.45 TAMB = -40C to +85C TAMB = -40C to +125C Max 25 16 1000 1000 0.55 Units MHz MHz ns ns -- 4.5V to 5.5V 3.0V to 4.5V 4.5V to 5.5V 3.0V to 4.5V TOSH / (TOSH + TOSL) VDD = 3.0V to 5.5V VDD = 4.5V to 5.5V Conditions Oscillator Timing Characteristics Param. No. Sym FOSC TOSC TDUTY Note: Characteristic Clock In Frequency Clock In Period Duty Cycle (External Clock Input)
This parameter is periodically sampled and not 100% tested.
TABLE 12-3:
CAN INTERFACE AC CHARACTERISTICS
Industrial (I): Extended (E): Min 50 -- TAMB = -40C to +85C TAMB = -40C to +125C Max -- 100 Units ns ns VDD = 3.0V to 5.5V VDD = 4.5V to 5.5V Conditions
CAN Interface AC Characteristics Param. No. Sym TWF TDCLK Characteristic Wakeup Noise Filter CLOCKOUT Propagation Delay
TABLE 12-4:
CLKOUT PIN AC/DC CHARACTERISTICS
Industrial (I): Extended (E): Min 15 15 -- -- -- TAMB = -40C to +85C TAMB = -40C to +125C Max -- -- 5 5 100 Units ns ns ns ns ns VDD = 3.0V to 5.5V VDD = 4.5V to 5.5V Conditions TOSC = 40 ns (Note) TOSC = 40 ns (Note) Measured from 0.3 VDD to 0.7 VDD (Note) Measured from 0.7 VDD to 0.3 VDD (Note)
CLKOUT Pin AC/DC Characteristics Param. No. Sym thCLKOUT tlCLKOUT trCLKOUT tfCLKOUT tdCLKOUT Note: Characteristic CLKOUT Pin High Time CLKOUT Pin Low Time CLKOUT Pin Rise Time CLKOUT Pin Fall Time CLOCKOUT Propagation Delay
CLKOUT prescaler set to divide by one.
(c) 2007 Microchip Technology Inc.
DS21291F-page 63
MCP2510
TABLE 12-5: SPI INTERFACE AC CHARACTERISTICS
Industrial (I): Extended (E): Min -- -- -- 100 100 115 180 100 100 280 20 20 30 20 20 50 -- -- 90 115 180 90 115 180 50 50 -- -- -- 0 -- TAMB = -40C to +85C TAMB = -40C to +125C Max 5 4 2.5 -- -- -- -- -- -- -- -- -- -- -- -- -- 2 2 -- -- -- -- -- -- -- -- 90 115 180 -- 200 Units MHz MHz MHz ns ns ns ns ns ns ns ns ns ns ns ns ns s s ns ns ns ns ns ns ns ns ns ns ns ns ns VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V Note Note VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V Note Note VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V VDD = 3.0V to 5.5V VDD = 4.5V to 5.5V Conditions VDD = 4.5V to 5.5V VDD = 4.5V to 5.5V (E temp) VDD = 3.0V to 4.5V SPI Interface AC Characteristics Param. No. Sym FCLK Characteristic Clock Frequency
1 2
TCSS TCSH
CS Setup Time CS Hold Time
3
TCSD
CS Disable Time
4
TSU
Data Setup Time
5
THD
Data Hold Time
6 7 8
TR TF THI
CLK Rise Time CLK Fall Time Clock High Time
9
TLO
Clock Low Time
10 11 12
TCLD TCLE TV
Clock Delay Time Clock Enable Time Output Valid from Clock Low
13 14 Note:
THO TDIS
Output Hold Time Output Disable Time
This parameter is not 100% tested.
DS21291F-page 64
(c) 2007 Microchip Technology Inc.
MCP2510
13.0
13.1
PACKAGING INFORMATION
Package Marking Information
18-Lead PDIP (300 mil) XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX YYWWNNN
Example: MCP2510-I/P e3 XXXXXXXXXXXXXXXXX 0726NNN
18-Lead SOIC (300 mil)
Example:
XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX YYWWNNN
MCP2510-I/SO e3 XXXXXXXXXXXX XXXXXXXXXXXX 0737NNN
20-Lead TSSOP (4.4 mm)
Example:
XXXXXXXX XXXXXNNN YYWW
MCP2510 e3 I/STNNN 0728
Legend: XX...X Y YY WW NNN
e3
*
Customer-specific information Year code (last digit of calendar year) Year code (last 2 digits of calendar year) Week code (week of January 1 is week `01') Alphanumeric traceability code Pb-free JEDEC designator for Matte Tin (Sn) This package is Pb-free. The Pb-free JEDEC designator ( e3 ) can be found on the outer packaging for this package.
Note:
In the event the full Microchip part number cannot be marked on one line, it will be carried over to the next line, thus limiting the number of available characters for customer-specific information.
(c) 2007 Microchip Technology Inc.
DS21291F-page 65
MCP2510
18-Lead Plastic Dual In-Line (P) - 300 mil Body [PDIP]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging
N NOTE 1
E1
1
2
3 D E
A
A2 L A1 b1 b e
Units Dimension Limits Number of Pins Pitch Top to Seating Plane Molded Package Thickness Base to Seating Plane Shoulder to Shoulder Width Molded Package Width Overall Length Tip to Seating Plane Lead Thickness Upper Lead Width Lower Lead Width Overall Row Spacing N e A A2 A1 E E1 D L c b1 b eB - .115 .015 .300 .240 .880 .115 .008 .045 .014 - MIN INCHES NOM 18 .100 BSC - .130 - .310 .250 .900 .130 .010 .060 .018 - .210 .195 - .325 .280 .920 .150 .014 .070 .022 MAX
c
eB
.430 Notes: 1. Pin 1 visual index feature may vary, but must be located within the hatched area. 2. Significant Characteristic. 3. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed .010" per side. 4. Dimensioning and tolerancing per ASME Y14.5M. BSC: Basic Dimension. Theoretically exact value shown without tolerances. Microchip Technology Drawing C04-007B
DS21291F-page 66
(c) 2007 Microchip Technology Inc.
MCP2510
18-Lead Plastic Small Outline (SO) - Wide, 7.50 mm Body [SOIC]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging
D N
E E1 NOTE 1 1 23 b
e h A2 c h
A
A1
L L1
Units Dimension Limits Number of Pins Pitch Overall Height Molded Package Thickness Standoff Overall Width Molded Package Width Overall Length Chamfer (optional) Foot Length Footprint Foot Angle Lead Thickness Lead Width Mold Draft Angle Top Mold Draft Angle Bottom N e A A2 A1 E E1 D h L L1 c b 0 0.20 0.31 5 5 0.25 0.40 - 2.05 0.10 MIN
MILLMETERS NOM 18 1.27 BSC - - - 10.30 BSC 7.50 BSC 11.55 BSC - - 1.40 REF - - - - - 8 0.33 0.51 15 0.75 1.27 2.65 - 0.30 MAX
15 Notes: 1. Pin 1 visual index feature may vary, but must be located within the hatched area. 2. Significant Characteristic. 3. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.15 mm per side. 4. Dimensioning and tolerancing per ASME Y14.5M. BSC: Basic Dimension. Theoretically exact value shown without tolerances. REF: Reference Dimension, usually without tolerance, for information purposes only. Microchip Technology Drawing C04-051B
(c) 2007 Microchip Technology Inc.
DS21291F-page 67
MCP2510
20-Lead Plastic Thin Shrink Small Outline (ST) - 4.4 mm Body [TSSOP]
Note: For the most current package drawings, please see the Microchip Packaging Specification located at http://www.microchip.com/packaging
D N
E E1
NOTE 1 12 b e
c A A2
A1
L1
L
Units Dimension Limits Number of Pins Pitch Overall Height Molded Package Thickness Standoff Overall Width Molded Package Width Molded Package Length Foot Length Footprint Foot Angle Lead Thickness N e A A2 A1 E E1 D L L1 c 0 0.09 4.30 6.40 0.45 - 0.80 0.05 MIN
MILLIMETERS NOM 20 0.65 BSC - 1.00 - 6.40 BSC 4.40 6.50 0.60 1.00 REF - - 8 0.20 4.50 6.60 0.75 1.20 1.05 0.15 MAX
Lead Width b 0.19 - 0.30 Notes: 1. Pin 1 visual index feature may vary, but must be located within the hatched area. 2. Dimensions D and E1 do not include mold flash or protrusions. Mold flash or protrusions shall not exceed 0.15 mm per side. 3. Dimensioning and tolerancing per ASME Y14.5M. BSC: Basic Dimension. Theoretically exact value shown without tolerances. REF: Reference Dimension, usually without tolerance, for information purposes only. Microchip Technology Drawing C04-088B
DS21291F-page 68
(c) 2007 Microchip Technology Inc.
MCP2510
APPENDIX A: REVISION HISTORY
Revision F (January 2007) This revision includes updates to the packaging diagrams.
(c) 2007 Microchip Technology Inc.
DS21291F-page 69
NOTES:
DS21291F-page 70
(c) 2007 Microchip Technology Inc.
MCP2510
INDEX
A Acknowledge Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 B BFpctrl - RXnBF Pin Control and Status Register . . . . . . . 26 Bit Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 BIT Modify instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Bit Modify Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Bit Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Bit Timing Configuration Registers . . . . . . . . . . . . . . . . . . 39 Bit Timing Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Bus Activity Wakeup Interrupt . . . . . . . . . . . . . . . . . . . . . . 45 Bus Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Byte Write instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 C CAN Buffers and Protocol Engine Block Diagram . . . . . . . . 5 CAN controller Register Map . . . . . . . . . . . . . . . . . . . . . . . 55 CAN Interface AC characteristics . . . . . . . . . . . . . . . . . . . 63 CAN Protocol Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 CAN Protocol Engine Block Diagram . . . . . . . . . . . . . . . . . 6 CANCTRL - CAN Control Register . . . . . . . . . . . . . . . . . . 52 CANINTE - Interrupt Enable Register . . . . . . . . . . . . . . . . 47 CANSTAT - CAN Status Register . . . . . . . . . . . . . . . . . . . 53 CNF1 - Configuration Register1 . . . . . . . . . . . . . . . . . . . . 39 CNF2 - Configuration Register2 . . . . . . . . . . . . . . . . . . . . 40 CNF3 - Configuration Register3 . . . . . . . . . . . . . . . . . . . . 40 Configuration Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 CRC Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Crystal/ceramic resonator operation . . . . . . . . . . . . . . . . . 49 Cyclic Redundancy Check . . . . . . . . . . . . . . . . . . . . . . . . . . 6 D DC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Device Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 E EFLG - Error Flag Register . . . . . . . . . . . . . . . . . . . . . . . . 43 Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Error Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Error Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7, 13 Error Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Error Management Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Error Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Error Modes and Error Counters . . . . . . . . . . . . . . . . . . . . 41 Error States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Extended Data Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 External Clock (osc1) Timing characteristics . . . . . . . . . . . 63 External Clock Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 External Series Resonant Crystal Oscillator Circuit . . . . . . 50 F Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Filter/Mask Truth Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Form Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Frame Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 H Hard Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 I Information Processing Time . . . . . . . . . . . . . . . . . . . . . . . 36 Initiating Message Transmission . . . . . . . . . . . . . . . . . . . . 15 Interframe Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Interrupt Acknowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 L Lenghtening a Bit Period . . . . . . . . . . . . . . . . . . . . . . . . . 37 Listen Only Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Loopback Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 M Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Acceptance Filter . . . . . . . . . . . . . . . . . . . . . . . Message Acceptance Filters and Masks . . . . . . . . . . . . . Message Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Reception Flowchart . . . . . . . . . . . . . . . . . . . . . Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N Normal Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 O Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Oscillator Tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Overload Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 P Package Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Packaging Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Phase Buffer Segments . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Programming Time Segments . . . . . . . . . . . . . . . . . . . . . 38 Propagation Segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Protocol Finite State Machine . . . . . . . . . . . . . . . . . . . . . . 6 R Read Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Read instruction Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 58 Read Status Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Read Status instruction . . . . . . . . . . . . . . . . . . . . . . . . . . 59 REC - Receiver Error Count . . . . . . . . . . . . . . . . . . . . . . . 42 Receive Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Receive Buffers Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 22 Receive Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Receive Message Buffering . . . . . . . . . . . . . . . . . . . . . . . 21 Receiver Error Passive . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Receiver Overrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Receiver Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Remote Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Request To Send (RTS) Instruction . . . . . . . . . . . . . . 57, 59 Resynchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 RXB0BF and RXB1BF Pins . . . . . . . . . . . . . . . . . . . . . . . 21 RXB0CTRL - Receive Buffer 0 Control Register . . . . . . . 24 RXB1CTRL - Receive Buffer 1 Control Register . . . . . . . 25 RXBnDLC - Receive Buffer n Data Length Code . . . . . . . 28 RXBnDm - Receive Buffer n Data Field Byte m . . . . . . . . 28 RXBnEID0 - Receive Buffer n Extended Identifier Low . . 28 RXBnEID8 - Receive Buffer n Extended Identifier Mid . . 27 RXBnSIDH - Receive Buffer n Standard Identifier High . . 26 RXBnSIDL - Receive Buffer n Standard Identifier Low . . 27 RXFnEID0 - Acceptance Filter n Extended Identifier Low 32 RXFnEID8 - Acceptance Filter n Extended Identifier Mid 31 RXFnSIDH - Acceptance Filter n Standard Identifier High 30 RXFnSIDL - Acceptance Filter n Standard Identifier Low 31 RXMnEID0 - Acceptance Filter Mask n Extended Identifier Low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 RXMnEID8 - Acceptance Filter Mask n Extended Identifier Mid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 RXMnSIDH - Acceptance Filter Mask n Standard Identifier High . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 61 30 29 21 23 51
(c) 2007 Microchip Technology Inc.
DS21291F-page 71
MCP2510
RXMnSIDL - Acceptance Filter Mask n Standard Identifier Low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 S Sample Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Shortening a Bit Period . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Sleep Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 SPI Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 SPI Interface Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 SPI Port AC Characteristics . . . . . . . . . . . . . . . . . . . . . . . . 64 Standard Data Frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Stuff Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Synchronization Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Synchronization Segment . . . . . . . . . . . . . . . . . . . . . . . . . 36 T TEC - Transmitter Error Count . . . . . . . . . . . . . . . . . . . . . . 42 Time Quanta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Transmit Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Transmit Message Aborting . . . . . . . . . . . . . . . . . . . . . . . . 15 Transmit Message Buffering . . . . . . . . . . . . . . . . . . . . . . . 15 Transmit Message Buffers . . . . . . . . . . . . . . . . . . . . . . . . . 15 Transmit Message flowchart . . . . . . . . . . . . . . . . . . . . . . . 16 Transmit Message Priority . . . . . . . . . . . . . . . . . . . . . . . . . 15 Transmitter Error Passive . . . . . . . . . . . . . . . . . . . . . . . . . 46 Transmitter Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 TXBnCTRL Transmit buffer n Control Register . . . . . . . . . 17 TXBnDm - Transmit Buffer n Data Field Byte m . . . . . . . . 20 TXBnEID0 - Transmit Buffer n Extended Identifier Low . . 20 TXBnEID8 - Transmit Buffer n Extended Identifier Mid . . . 19 TXBnEIDH - Transmit Buffer n Extended Identifier High . . 19 TXBnSIDH - Transmit Buffer n Standard Identifier High . . 18 TXBnSIDL - Transmit Buffer n Standard Identifier Low . . . 19 TXnRTS Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 TXRTSCTRL - TXBNRTS Pin Control and Status Register . 18 Typical System Implementation . . . . . . . . . . . . . . . . . . . . . . 4 W WAKE-up functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Write Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 WWW, On-Line Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
DS21291F-page 72
(c) 2007 Microchip Technology Inc.
MCP2510
THE MICROCHIP WEB SITE
Microchip provides online support via our WWW site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information: * Product Support - Data sheets and errata, application notes and sample programs, design resources, user's guides and hardware support documents, latest software releases and archived software * General Technical Support - Frequently Asked Questions (FAQ), technical support requests, online discussion groups, Microchip consultant program member listing * Business of Microchip - Product selector and ordering guides, latest Microchip press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels: * * * * * Distributor or Representative Local Sales Office Field Application Engineer (FAE) Technical Support Development Systems Information Line
Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document. Technical support is available through the web site at: http://support.microchip.com
CUSTOMER CHANGE NOTIFICATION SERVICE
Microchip's customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest. To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.
(c) 2007 Microchip Technology Inc.
Advance Information
DS21291F-page 73
MCP2510
READER RESPONSE
It is our intention to provide you with the best documentation possible to ensure successful use of your Microchip product. If you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation can better serve you, please FAX your comments to the Technical Publications Manager at (480) 792-4150. Please list the following information, and use this outline to provide us with your comments about this document. To: RE: Technical Publications Manager Reader Response Total Pages Sent ________
From: Name Company Address City / State / ZIP / Country Telephone: (_______) _________ - _________ Application (optional): Would you like a reply? Device: MCP2510 Questions: 1. What are the best features of this document? Y N Literature Number: DS21291F FAX: (______) _________ - _________
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
6. Is there any incorrect or misleading information (what and where)?
7. How would you improve this document?
DS21291F-page 74
Advance Information
(c) 2007 Microchip Technology Inc.
MCP2510
PRODUCT IDENTIFICATION SYSTEM
To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. PART NO. Device X Temperature Range /XX Package Examples:
a) b)
CAN Controller w/SPI Interface CAN Controller w/SPI Interface (Tape and Reel)
MCP2510-E/P:
PDIP package.
Extended Industrial Extended Industrial
temperature, temperature, temperature, temperature,
MCP2510-I/P:
PDIP package.
Device:
MCP2510: MCP2510T:
c) d) e) f)
MCP2510-E/SO:
SOIC package.
MCP2510-I/SO:
SOIC package.
Temperature Range:
E
= -40C to +85C = -40C to +125C
MCP2510-I/SO: MCP2510I/ST:
Tape and Reel, Industrial temperature, SOIC package. Industrial temperature, TSSOP package.
Package:
P = Plastic DIP (300 mil Body), 18-Lead SO = Plastic SOIC (300 mil Body), 18-Lead ST = TSSOP, (4.4 mm Body), 20-Lead
g)
MCP2510T-I/ST:
Tape and Reel, Industrial temperature, TSSOP package.
(c) 2007 Microchip Technology Inc.
DS21291F-page75
MCP2510
NOTES:
DS21291F-page 76
(c) 2007 Microchip Technology Inc.
Note the following details of the code protection feature on Microchip devices: * * Microchip products meet the specification contained in their particular Microchip Data Sheet. Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions. There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip's Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property. Microchip is willing to work with the customer who is concerned about the integrity of their code. Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as "unbreakable."
*
* *
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip's code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
Trademarks The Microchip name and logo, the Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, PRO MATE, PowerSmart, rfPIC, and SmartShunt are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, SEEVAL, SmartSensor and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, Linear Active Thermistor, Mindi, MiWi, MPASM, MPLIB, MPLINK, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, REAL ICE, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance, UNI/O, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. (c) 2007, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved. Printed on recycled paper.
Microchip received ISO/TS-16949:2002 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona, Gresham, Oregon and Mountain View, California. The Company's quality system processes and procedures are for its PIC(R) MCUs and dsPIC DSCs, KEELOQ(R) code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip's quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
(c) 2007 Microchip Technology Inc.
DS21291F-page 77
WORLDWIDE SALES AND SERVICE
AMERICAS
Corporate Office 2355 West Chandler Blvd. Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Web Address: www.microchip.com Atlanta Duluth, GA Tel: 678-957-9614 Fax: 678-957-1455 Boston Westborough, MA Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, IL Tel: 630-285-0071 Fax: 630-285-0075 Dallas Addison, TX Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, MI Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, IN Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles Mission Viejo, CA Tel: 949-462-9523 Fax: 949-462-9608 Santa Clara Santa Clara, CA Tel: 408-961-6444 Fax: 408-961-6445 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509
ASIA/PACIFIC
Asia Pacific Office Suites 3707-14, 37th Floor Tower 6, The Gateway Habour City, Kowloon Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 Australia - Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China - Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China - Chengdu Tel: 86-28-8665-5511 Fax: 86-28-8665-7889 China - Fuzhou Tel: 86-591-8750-3506 Fax: 86-591-8750-3521 China - Hong Kong SAR Tel: 852-2401-1200 Fax: 852-2401-3431 China - Qingdao Tel: 86-532-8502-7355 Fax: 86-532-8502-7205 China - Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China - Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China - Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 China - Shunde Tel: 86-757-2839-5507 Fax: 86-757-2839-5571 China - Wuhan Tel: 86-27-5980-5300 Fax: 86-27-5980-5118 China - Xian Tel: 86-29-8833-7250 Fax: 86-29-8833-7256
ASIA/PACIFIC
India - Bangalore Tel: 91-80-4182-8400 Fax: 91-80-4182-8422 India - New Delhi Tel: 91-11-4160-8631 Fax: 91-11-4160-8632 India - Pune Tel: 91-20-2566-1512 Fax: 91-20-2566-1513 Japan - Yokohama Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Korea - Gumi Tel: 82-54-473-4301 Fax: 82-54-473-4302 Korea - Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 or 82-2-558-5934 Malaysia - Penang Tel: 60-4-646-8870 Fax: 60-4-646-5086 Philippines - Manila Tel: 63-2-634-9065 Fax: 63-2-634-9069 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan - Hsin Chu Tel: 886-3-572-9526 Fax: 886-3-572-6459 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350
EUROPE
Austria - Wels Tel: 43-7242-2244-39 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany - Munich Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy - Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands - Drunen Tel: 31-416-690399 Fax: 31-416-690340 Spain - Madrid Tel: 34-91-708-08-90 Fax: 34-91-708-08-91 UK - Wokingham Tel: 44-118-921-5869 Fax: 44-118-921-5820
12/08/06
DS21291F-page 78
(c) 2007 Microchip Technology Inc.
MCP2510
Stand-Alone CAN Controller with SPITM Interface 1 1.0 Device Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.0 Can Message Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.0 Message Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.0 Message Reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.0 Bit Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.0 Error Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 7.0 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 8.0 Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 9.0 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 10.0 Register Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 11.0 SPI Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 12.0 Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 13.0 Packaging Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 On-Line Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Reader Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Product Identification System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Worldwide Sales and Service ............................................................................................................................................................. 76
(c) 2007 Microchip Technology Inc.
DS21291F-page 79
MCP2510
DS21291F-page 80
(c) 2007 Microchip Technology Inc.


▲Up To Search▲   

 
Price & Availability of MCP2510-P

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X